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

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,
};
const response = await client.post<{ success: boolean }>("/email", payload);
const response = await client.post<{ success: boolean }>("/email/", payload);
return response.data.success;
} catch (error) {
+1 -1
View File
@@ -62,7 +62,7 @@ const PriceLisForm: React.FC<Props> = ({ open, onClose }) => {
const sendToBackend = async (data: FormData): Promise<boolean> => {
try{
const response = await client.post<{success: boolean}>("/email", {
const response = await client.post<{success: boolean}>("/email/", {
...data,
})
+1 -1
View File
@@ -60,7 +60,7 @@ const PhoneRequest: React.FC<Props> = ({ onSend }) => {
await onSend(phone);
} else {
await client.post("/api/contact/send-phone", { phone });
await client.post("/api/contact/send-phone/", { phone });
}
setSuccess(true);
+1 -1
View File
@@ -5,7 +5,7 @@ import {client} from "../../api/client";
export const fetchCategories = createAsyncThunk<Category[]>(
"categories/fetchCategories",
async () => {
const res = await client.get<Category[]>("/categories");
const res = await client.get<Category[]>("/categories/");
return res.data;
}
);
+2 -2
View File
@@ -32,7 +32,7 @@ export const fetchProductsByCategory = createAsyncThunk(
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 }
return res.data;
}
@@ -41,7 +41,7 @@ export const fetchProductsByCategory = createAsyncThunk(
export const fetchProductById = createAsyncThunk(
"product/fetchById",
async (id: string) => {
const response = await client.get<Product>(`/products/${id}`);
const response = await client.get<Product>(`/products/${id}/`);
return response.data;
}
);