updd: announcement

Deskripsi:
- edit pengumuman
- delete pengumuman

No Issues
This commit is contained in:
amel
2025-05-08 11:27:11 +08:00
parent 6cae53cbc7
commit e64f7c7e14
6 changed files with 263 additions and 45 deletions

View File

@@ -222,3 +222,13 @@ export const apiGetAnnouncementOne = async ({ user, id }: { user: string, id: st
const response = await api.get(`mobile/announcement/${id}?user=${user}`);
return response.data;
};
export const apiEditAnnouncement = async (data: { title: string, desc: string, user: string, groups: any[] }, id: string) => {
const response = await api.put(`/mobile/announcement/${id}`, data)
return response.data;
};
export const apiDeleteAnnouncement = async (data: { user: string }, id: string) => {
const response = await api.delete(`mobile/announcement/${id}`, { data })
return response.data
};