From 01c5592f7de77e7cd29f54f5aa6c06caeab71d33 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Tue, 10 Sep 2024 12:39:15 +0700 Subject: [PATCH] refactor: remove unneccesary --- src/stores/my-branch/index.ts | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/src/stores/my-branch/index.ts b/src/stores/my-branch/index.ts index 11d055da..20fae24a 100644 --- a/src/stores/my-branch/index.ts +++ b/src/stores/my-branch/index.ts @@ -22,14 +22,7 @@ const useMyBranch = defineStore('useMyBranchStore', () => { filter?: 'head' | 'sub'; }, Data extends Pagination, - >( - opts?: Options, - flow?: { - sessionId?: string; - refTransactionId?: string; - transactionId?: string; - }, - ): Promise { + >(opts?: Options): Promise { 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( `/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>(`/user/${userId}/branch`, { headers: { - 'X-Session-Id': flow?.sessionId, - 'X-Rtid': flow?.refTransactionId || flowStore.rtid, - 'X-Tid': flow?.transactionId, + 'X-Rtid': flowStore.rtid, }, });