fix: type
This commit is contained in:
parent
4d57c3d056
commit
fd922592d9
1 changed files with 8 additions and 9 deletions
|
|
@ -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<Pagination<User[]>>();
|
||||
|
||||
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<Pagination<Branch[]>>(`/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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue