feat : update module

Deskripsi:
- update announcement and api
- update position and api

No Issue
This commit is contained in:
lukman
2024-08-09 15:47:59 +08:00
parent 925e54deec
commit 5b4b780af5
35 changed files with 630 additions and 216 deletions

View File

@@ -0,0 +1,9 @@
export const funGetAllAnnouncement = async (path?: string) => {
const response = await fetch(`/api/announcement${(path) ? path : ''}`, { next: { tags: ['announcement'] } });
return await response.json().catch(() => null);
}
export const funGetAnnouncementById = async (path: string) => {
const response = await fetch(`/api/announcement/${path}`);
return await response.json().catch(() => null);
}