feat : update api project

This commit is contained in:
lukman
2024-08-21 17:30:41 +08:00
parent a36fe88998
commit dab77c0bbc
12 changed files with 774 additions and 203 deletions

View File

@@ -3,4 +3,9 @@
export const funGetAllProject = async (path?: string) => {
const response = await fetch(`/api/project${(path) ? path : ''}`, { next: { tags: ['project'] } });
return await response.json().catch(() => null);
}
export const funGetOneProjectById = async (path: string, kategori: string) => {
const response = await fetch(`/api/project/${path}?cat=${kategori}`);
return await response.json().catch(() => null);
}