frontend: add config for endpoints
Signed-off-by: Nicolas Froger <nicolas@kektus.xyz>
This commit is contained in:
parent
ddc6c64f0f
commit
bfaa1c0014
7 changed files with 19 additions and 7 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import { API_BASE_URL } from '@/config.js'
|
||||
|
||||
export const useAuthStore = defineStore("auth", () => {
|
||||
const adminToken = ref("");
|
||||
|
|
@ -11,7 +12,7 @@ export const useAuthStore = defineStore("auth", () => {
|
|||
isAuth.value = false;
|
||||
error.value = false;
|
||||
|
||||
return fetch("http://localhost:8080/admin/auth/check", {
|
||||
return fetch(API_BASE_URL + "/admin/auth/check", {
|
||||
headers: {
|
||||
"X-admin-token": token
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue