13 lines
357 B
TypeScript
13 lines
357 B
TypeScript
export async function getServices() {
|
|
const response = await fetch("/api/service/list");
|
|
const body = await response.json();
|
|
console.log(body);
|
|
const { services } = body;
|
|
return services;
|
|
}
|
|
|
|
export async function getService(id: number) {
|
|
const response = await fetch(`/api/service/${id}`);
|
|
const body = await response.json();
|
|
return body;
|
|
}
|