mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-09-19 17:50:13 +00:00
implement group page (#6)
* implement group page * group state, search box * rename some field * update api types
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { ModelNotificationGroupForm } from "@/types"
|
||||
import { fetcher, FetcherMethod } from "./api"
|
||||
|
||||
export const createNotificationGroup = async (data: ModelNotificationGroupForm): Promise<number> => {
|
||||
return fetcher<number>(FetcherMethod.POST, '/api/v1/notification-group', data);
|
||||
}
|
||||
|
||||
export const updateNotificationGroup = async (id: number, data: ModelNotificationGroupForm): Promise<void> => {
|
||||
return fetcher<void>(FetcherMethod.PATCH, `/api/v1/notification-group/${id}`, data);
|
||||
}
|
||||
|
||||
export const deleteNotificationGroups = async (id: number[]): Promise<void> => {
|
||||
return fetcher<void>(FetcherMethod.POST, `/api/v1/batch-delete/notification-group`, id)
|
||||
}
|
||||
Reference in New Issue
Block a user