Merge branch 'front_foundation' of https://gitea.piair.dev/piair/MyINPulse into front_foundation
Some checks failed
Format / formatting (push) Successful in 5s
Build / build (push) Successful in 38s
Format / formatting (pull_request) Successful in 5s
CI / build (push) Failing after 8s

This commit is contained in:
ALAMI Adnane 2025-04-12 22:23:20 +02:00
commit ad1fd45bed
2 changed files with 6 additions and 3 deletions

View File

@ -18,7 +18,8 @@
"pinia": "^2.3.1", "pinia": "^2.3.1",
"pinia-plugin-persistedstate": "^4.2.0", "pinia-plugin-persistedstate": "^4.2.0",
"vue": "^3.5.13", "vue": "^3.5.13",
"vue-router": "^4.5.0" "vue-router": "^4.5.0",
"jwt-decode": "^4.0.0"
}, },
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.49.1", "@playwright/test": "^1.49.1",

View File

@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted } from "vue"; import { onMounted, ref } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import {jwtDecode} from "jwt-decode"; import {jwtDecode} from "jwt-decode"; // i hope this doesn't break the code later
import { store } from "../main.ts"; import { store } from "../main.ts";
import { callApi } from "@/services/api.ts"; import { callApi } from "@/services/api.ts";
@ -13,6 +13,8 @@ type TokenPayload = {
}; };
}; };
const customRequest = ref('');
onMounted(() => { onMounted(() => {
if (store.authenticated && store.user.token) { if (store.authenticated && store.user.token) {
try { try {