auth provider + private route

This commit is contained in:
hamid zarghami
2026-05-23 16:40:03 +03:30
parent 612deba297
commit cbdc7edbf5
6 changed files with 181 additions and 69 deletions
+5 -5
View File
@@ -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;
};