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,
|
UserCreate,
|
||||||
} from './types';
|
} from './types';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import { Branch } from '../branch/types';
|
||||||
|
|
||||||
const useUserStore = defineStore('api-user', () => {
|
const useUserStore = defineStore('api-user', () => {
|
||||||
const userStats = ref()
|
|
||||||
const data = ref<Pagination<User[]>>();
|
const data = ref<Pagination<User[]>>();
|
||||||
|
|
||||||
async function fetchAttachment(
|
async function fetchAttachment(
|
||||||
|
|
@ -282,7 +282,7 @@ const useUserStore = defineStore('api-user', () => {
|
||||||
transactionId: string;
|
transactionId: string;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const res = await api.get(`/user/${userId}/branch`, {
|
const res = await api.get<Pagination<Branch[]>>(`/user/${userId}/branch`, {
|
||||||
headers: {
|
headers: {
|
||||||
'X-Session-Id': flow?.sessionId,
|
'X-Session-Id': flow?.sessionId,
|
||||||
'X-Rtid': flow?.refTransactionId,
|
'X-Rtid': flow?.refTransactionId,
|
||||||
|
|
@ -347,19 +347,18 @@ const useUserStore = defineStore('api-user', () => {
|
||||||
return res.data || true;
|
return res.data || true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function typeStats(
|
async function typeStats(flow?: {
|
||||||
flow?: {
|
sessionId: string;
|
||||||
sessionId: string;
|
refTransactionId: string;
|
||||||
refTransactionId: string;
|
transactionId: string;
|
||||||
transactionId: string;
|
}) {
|
||||||
},) {
|
|
||||||
const res = await api.get(`/user/type-stats`, {
|
const res = await api.get(`/user/type-stats`, {
|
||||||
headers: {
|
headers: {
|
||||||
'X-Session-Id': flow?.sessionId,
|
'X-Session-Id': flow?.sessionId,
|
||||||
'X-Rtid': flow?.refTransactionId,
|
'X-Rtid': flow?.refTransactionId,
|
||||||
'X-Tid': flow?.transactionId,
|
'X-Tid': flow?.transactionId,
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
if (!res) return false;
|
if (!res) return false;
|
||||||
if (res.status === 200) return res.data;
|
if (res.status === 200) return res.data;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue