list of pager + change status

This commit is contained in:
hamid zarghami
2025-12-10 15:15:40 +03:30
parent abae41914f
commit e1f6499ba0
10 changed files with 321 additions and 384 deletions
+13
View File
@@ -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;
};