images added
All checks were successful
/ Make image (push) Successful in 1m22s

This commit is contained in:
nquidox 2025-10-18 14:10:21 +03:00
parent c29caf01c8
commit 9d80345b77
7 changed files with 332 additions and 15 deletions

View file

@ -126,10 +126,17 @@ export const apiClient = {
const fullUrl = queryString ? `${url}?${queryString}` : url;
return request(fullUrl, { method: 'GET' });
},
post: (url, data) => request(url, {
method: 'POST',
body: JSON.stringify(data),
}),
post: (url, data) => {
const isFormData = data instanceof FormData
return request(url, {
method: 'POST',
body: isFormData ? data : JSON.stringify(data),
headers: isFormData
? {}
: { 'Content-Type': 'application/json' }
})
},
put: (url, data) => request(url, {
method: 'PUT',
body: JSON.stringify(data),