Order zwracał 403, bo nie było headerów

Zdjęcia nie były centerowane względem szerokości
This commit is contained in:
2025-06-10 11:24:08 +02:00
parent c0b8800f83
commit 8f72f28566
5 changed files with 36 additions and 32 deletions

View File

@@ -27,7 +27,6 @@ export async function createOrder(noticeId, orderType) {
export async function createPayment(orderId) {
const { token } = useAuthStore.getState();
const headers = token ? { Authorization: `Bearer ${token}` } : {};
const clientId = 1;
try {
const response = await axios.post(
`${API_URL}/token?orderId=${orderId}`,
@@ -48,7 +47,7 @@ export async function getOrder(orderId) {
const headers = token ? { Authorization: `Bearer ${token}` } : {};
try {
const response = await axios.get(`${API_URL}/get/${orderId}`, { headers });
const response = await axios.get(`${API_URL}/get/${orderId}`, { headers: headers });
return response.data;
} catch (error) {
console.error(
@@ -65,7 +64,7 @@ export async function listOrders() {
const headers = token ? { Authorization: `Bearer ${token}` } : {};
try {
const response = await axios.get(`${API_URL}/get/all`, { headers });
const response = await axios.get(`${API_URL}/get/all`, { headers: headers });
return response.data;
} catch (error) {
console.error(