Compare commits

..

No commits in common. "98fdf1c3fb482fe04dedc08f3b6baf1602be5cb7" and "5d62e751b38e82578c063ed984fc3dc0b47ee998" have entirely different histories.

2 changed files with 6 additions and 6 deletions

View File

@ -8,8 +8,8 @@ export default defineNuxtPlugin((nuxtApp) => {
const api = $fetch.create({
onRequest({ request, options, error }) {
options.baseURL =
config.public.VITE_BASE_URL +
config.public.VITE_API_NAME +
config.public.NUXT_PUBLIC_BASE_URL +
config.public.NUXT_PUBLIC_API_NAME +
options.baseURL;
if (token) {
@ -38,10 +38,10 @@ export default defineNuxtPlugin((nuxtApp) => {
// Add custom methods for GET, POST, and DELETE
const http = {
getRequest: (url: string, options = {}) => api(url, { method: "GET", ...options }),
postRequest: (url: string, body: any, options = {}) =>
getRequest: (url, options = {}) => api(url, { method: "GET", ...options }),
postRequest: (url, body, options = {}) =>
api(url, { method: "POST", body, ...options }),
deleteRequest: (url: string, options = {}) =>
deleteRequest: (url, options = {}) =>
api(url, { method: "DELETE", ...options }),
};

@ -1 +1 @@
Subproject commit 40b37e8f08bede2cb15f0b2fc5c639823c59b40e
Subproject commit daf14f2b1b116129a1c19e732df84d38d07b6275