Criticisms
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
// API service functions commented out - using static data instead
|
||||
// import axios from "../../../config/axios";
|
||||
import axios from "@/config/axios";
|
||||
|
||||
// export const getCriticismsList = async (page: number) => {
|
||||
// const { data } = await axios.get(`/criticisms?page=${page}`);
|
||||
// return data;
|
||||
// };
|
||||
export const getCriticismsList = async (page: number) => {
|
||||
const { data } = await axios.get(`/admin/criticisms?page=${page}`);
|
||||
return data;
|
||||
};
|
||||
|
||||
// export const getCriticismsDetail = async (id: string) => {
|
||||
// const { data } = await axios.get(`/criticisms/${id}`);
|
||||
// return data;
|
||||
// };
|
||||
export const getCriticismsDetail = async (id: string) => {
|
||||
const { data } = await axios.get(`/admin/criticisms/${id}`);
|
||||
return data;
|
||||
};
|
||||
|
||||
// export const deleteCriticisms = async (id: string) => {
|
||||
// const { data } = await axios.delete(`/criticisms/${id}`);
|
||||
// return data;
|
||||
// };
|
||||
export const deleteCriticisms = async (id: string) => {
|
||||
const { data } = await axios.delete(`/admin/criticisms/${id}`);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user