diff --git a/src/stores/user/index.ts b/src/stores/user/index.ts index d449a677..657359b8 100644 --- a/src/stores/user/index.ts +++ b/src/stores/user/index.ts @@ -10,9 +10,9 @@ import { UserCreate, } from './types'; import axios from 'axios'; +import { Branch } from '../branch/types'; const useUserStore = defineStore('api-user', () => { - const userStats = ref() const data = ref>(); async function fetchAttachment( @@ -282,7 +282,7 @@ const useUserStore = defineStore('api-user', () => { transactionId: string; }, ) { - const res = await api.get(`/user/${userId}/branch`, { + const res = await api.get>(`/user/${userId}/branch`, { headers: { 'X-Session-Id': flow?.sessionId, 'X-Rtid': flow?.refTransactionId, @@ -347,19 +347,18 @@ const useUserStore = defineStore('api-user', () => { return res.data || true; } - async function typeStats( - flow?: { - sessionId: string; - refTransactionId: string; - transactionId: string; - },) { + async function typeStats(flow?: { + sessionId: string; + refTransactionId: string; + transactionId: string; + }) { const res = await api.get(`/user/type-stats`, { headers: { 'X-Session-Id': flow?.sessionId, 'X-Rtid': flow?.refTransactionId, 'X-Tid': flow?.transactionId, }, - }) + }); if (!res) return false; if (res.status === 200) return res.data;