Merge branch 'main' into front_foundation
This commit is contained in:
18
front/MyINPulse-front/src/components/temp-modal.vue
Normal file
18
front/MyINPulse-front/src/components/temp-modal.vue
Normal file
@ -0,0 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
import { addNewMessage } from "@/services/popupDisplayer.ts";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button
|
||||
@click="
|
||||
addNewMessage(
|
||||
'new error from another view',
|
||||
Math.floor(Math.random() * 4)
|
||||
)
|
||||
"
|
||||
>
|
||||
Add an error
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
@ -14,7 +14,8 @@ axiosInstance.interceptors.response.use(
|
||||
async (error) => {
|
||||
const originalRequest = error.config;
|
||||
if (
|
||||
error.response.status === 401 &&
|
||||
((error.response && error.response.status === 401) ||
|
||||
error.code == "ERR_NETWORK") &&
|
||||
!originalRequest._retry &&
|
||||
store.authenticated
|
||||
) {
|
||||
|
@ -1,6 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { store } from "../main.ts";
|
||||
import { callApi } from "@/services/api.ts";
|
||||
import { ref } from "vue";
|
||||
|
||||
const CustomRequest = ref("");
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -50,11 +53,19 @@ import { callApi } from "@/services/api.ts";
|
||||
<tr>
|
||||
<td>Unauth API call</td>
|
||||
<td>
|
||||
<button @click="callApi('random3')">call</button>
|
||||
<button @click="callApi('unauth/dev')">call</button>
|
||||
</td>
|
||||
<td>res</td>
|
||||
<td id="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input v-model="CustomRequest" placeholder="edit me" />
|
||||
</td>
|
||||
<td>
|
||||
<button @click="callApi(CustomRequest)">call</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user