feat : update module
Deskripsi: - update announcement and api - update position and api No Issue
This commit is contained in:
9
src/module/announcement/lib/api_announcement.ts
Normal file
9
src/module/announcement/lib/api_announcement.ts
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user