Skip to content

Commit 245dcfe

Browse files
committed
fix: not checking auth when querying user's own operation sets
1 parent 5e870b2 commit 245dcfe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/apis/operation-set.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@ export function useOperationSets({
5151
keyword,
5252
creatorId: byMyself ? userId : undefined,
5353
} satisfies CopilotSetQuery,
54+
byMyself,
5455
]
5556
},
56-
async ([, req]) => {
57+
async ([, req, byMyself]) => {
5758
const res = await new OperationSetApi({
58-
sendToken: 'optional', // 如果有 token 会用来获取私有作业集
59+
sendToken: byMyself ? 'always' : 'optional', // 如果有 token 会用来获取自己的作业集
5960
requireData: true,
6061
}).querySets({ copilotSetQuery: req })
6162
return res.data

0 commit comments

Comments
 (0)