headers 경로 추가 -> 응답 다르게 하기

This commit is contained in:
yoon 2025-02-11 10:33:40 +09:00
parent c3b2bcec66
commit 724f0afc61

View File

@ -38,10 +38,10 @@
<script setup>
import $api from '@api';
import router from '@/router';
import { useRoute } from 'vue-router';
import { ref } from 'vue';
import UserFormInput from '@c/input/UserFormInput.vue';
import { useUserStore } from '@s/useUserStore';
import { useToastStore } from '@s/toastStore';
const id = ref('');
const password = ref('');
@ -50,7 +50,7 @@
const remember = ref(false);
const userStore = useUserStore();
const toastStore = useToastStore();
const route = useRoute();
const handleIdChange = value => {
id.value = value;
@ -67,7 +67,7 @@
loginId: id.value,
password: password.value,
remember: remember.value,
})
}, { headers: { 'X-Page-Route': route.path } })
.then(res => {
if (res.status === 200) {
userStore.userInfo();