Order zwracał 403, bo nie było headerów
Zdjęcia nie były centerowane względem szerokości
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user