auth provider + private route
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import axios from "@/config/axios";
|
||||
import type {
|
||||
CreateCatalogParamsType,
|
||||
UpdateCatalogParamsType,
|
||||
} from "../types/Types";
|
||||
import type {
|
||||
CatalogByIdResponseType,
|
||||
CatalogResponseType,
|
||||
} from "@/pages/catalogue/types/Types";
|
||||
import type {
|
||||
CreateCatalogParamsType,
|
||||
UpdateCatalogParamsType,
|
||||
} from "../types/Types";
|
||||
|
||||
export const createCatalog = async (params: CreateCatalogParamsType) => {
|
||||
const { data } = await axios.post("/admin/catalogue", params);
|
||||
@@ -20,7 +20,7 @@ export const getCatalogs = async () => {
|
||||
|
||||
export const getCatalogById = async (id: string) => {
|
||||
const { data } = await axios.get<CatalogByIdResponseType>(
|
||||
`/admin/catalogue/${id}`,
|
||||
`/public/catalogue/${id}`,
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user