добавил везде /

This commit is contained in:
Joe_Peach committed 2026-04-06 21:18:00 +03:00
1 parent 20afce31dd
commit d4f9aebf00
5 files changed
+6 -6

No files matched your search

@@ -70,7 +70,7 @@ const ModalRequestForm: React.FC<Props> = ({ open, onClose }) => {
...data, ...data,
}; };
const response = await client.post<{ success: boolean }>("/email", payload); const response = await client.post<{ success: boolean }>("/email/", payload);
return response.data.success; return response.data.success;
} catch (error) { } catch (error) {
+1 -1
View File
@@ -62,7 +62,7 @@ const PriceLisForm: React.FC<Props> = ({ open, onClose }) => {
const sendToBackend = async (data: FormData): Promise<boolean> => { const sendToBackend = async (data: FormData): Promise<boolean> => {
try{ try{
const response = await client.post<{success: boolean}>("/email", { const response = await client.post<{success: boolean}>("/email/", {
...data, ...data,
}) })
+1 -1
View File
@@ -60,7 +60,7 @@ const PhoneRequest: React.FC<Props> = ({ onSend }) => {
await onSend(phone); await onSend(phone);
} else { } else {
await client.post("/api/contact/send-phone", { phone }); await client.post("/api/contact/send-phone/", { phone });
} }
setSuccess(true); setSuccess(true);
+1 -1
View File
@@ -5,7 +5,7 @@ import {client} from "../../api/client";
export const fetchCategories = createAsyncThunk<Category[]>( export const fetchCategories = createAsyncThunk<Category[]>(
"categories/fetchCategories", "categories/fetchCategories",
async () => { async () => {
const res = await client.get<Category[]>("/categories"); const res = await client.get<Category[]>("/categories/");
return res.data; return res.data;
} }
); );
+2 -2
View File
@@ -32,7 +32,7 @@ export const fetchProductsByCategory = createAsyncThunk(
else qp.append(k, String(v)); else qp.append(k, String(v));
}); });
} }
const res = await client.get<FetchResponce>(`/products?${qp.toString()}`); const res = await client.get<FetchResponce>(`/products?${qp.toString()}/`);
// ожидаем { items: Product[], total: number, page: number, limit: number } // ожидаем { items: Product[], total: number, page: number, limit: number }
return res.data; return res.data;
} }
@@ -41,7 +41,7 @@ export const fetchProductsByCategory = createAsyncThunk(
export const fetchProductById = createAsyncThunk( export const fetchProductById = createAsyncThunk(
"product/fetchById", "product/fetchById",
async (id: string) => { async (id: string) => {
const response = await client.get<Product>(`/products/${id}`); const response = await client.get<Product>(`/products/${id}/`);
return response.data; return response.data;
} }
); );