refactor: remove unneccesary
This commit is contained in:
parent
9f06147ab1
commit
01c5592f7d
1 changed files with 4 additions and 24 deletions
|
|
@ -22,14 +22,7 @@ const useMyBranch = defineStore('useMyBranchStore', () => {
|
|||
filter?: 'head' | 'sub';
|
||||
},
|
||||
Data extends Pagination<Branch[]>,
|
||||
>(
|
||||
opts?: Options,
|
||||
flow?: {
|
||||
sessionId?: string;
|
||||
refTransactionId?: string;
|
||||
transactionId?: string;
|
||||
},
|
||||
): Promise<Data | false> {
|
||||
>(opts?: Options): Promise<Data | false> {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
for (const [k, v] of Object.entries(opts || {})) {
|
||||
|
|
@ -41,11 +34,7 @@ const useMyBranch = defineStore('useMyBranchStore', () => {
|
|||
const res = await api.get<Data>(
|
||||
`/branch${(params && '?'.concat(query)) || ''}`,
|
||||
{
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||
'X-Tid': flow?.transactionId,
|
||||
},
|
||||
headers: { 'X-Rtid': flowStore.rtid },
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -55,19 +44,10 @@ const useMyBranch = defineStore('useMyBranchStore', () => {
|
|||
return false;
|
||||
}
|
||||
|
||||
async function fetchListMyBranch(
|
||||
userId: string,
|
||||
flow?: {
|
||||
sessionId?: string;
|
||||
refTransactionId?: string;
|
||||
transactionId?: string;
|
||||
},
|
||||
) {
|
||||
async function fetchListMyBranch(userId: string) {
|
||||
const res = await api.get<Pagination<Branch[]>>(`/user/${userId}/branch`, {
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||
'X-Tid': flow?.transactionId,
|
||||
'X-Rtid': flowStore.rtid,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue