direct login
This commit is contained in:
@@ -9,22 +9,24 @@ import type {
|
||||
} from "@/pages/catalogue/types/Types";
|
||||
|
||||
export const createCatalog = async (params: CreateCatalogParamsType) => {
|
||||
const { data } = await axios.post("/catalogue", params);
|
||||
const { data } = await axios.post("/admin/catalogue", params);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getCatalogs = async () => {
|
||||
const { data } = await axios.get<CatalogResponseType>("/catalogue");
|
||||
const { data } = await axios.get<CatalogResponseType>("/admin/catalogue");
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getCatalogById = async (id: string) => {
|
||||
const { data } = await axios.get<CatalogByIdResponseType>(`/catalogue/${id}`);
|
||||
const { data } = await axios.get<CatalogByIdResponseType>(
|
||||
`/admin/catalogue/${id}`,
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const updateCatalog = async (params: UpdateCatalogParamsType) => {
|
||||
const { data } = await axios.patch(`/catalogue/${params.id}`, {
|
||||
const { data } = await axios.patch(`/admin/catalogue/${params.id}`, {
|
||||
content: params.content,
|
||||
});
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user