list of pager + change status
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import axios from "@/config/axios";
|
||||
import type { GetPagersResponse } from "../types/Types";
|
||||
import type { PagerStatus } from "../enum/Enum";
|
||||
|
||||
export const getPagers = async (): Promise<GetPagersResponse> => {
|
||||
const { data } = await axios.get<GetPagersResponse>("/admin/pager");
|
||||
return data;
|
||||
};
|
||||
|
||||
export const updatePagerStatus = async (id: string, status: PagerStatus) => {
|
||||
const { data } = await axios.patch(`/admin/pager/${id}/status`, { status });
|
||||
return data;
|
||||
};
|
||||
Reference in New Issue
Block a user