Skip to content

Commit

Permalink
fix: useAccessStore filter spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
liuweijie committed Jul 18, 2023
1 parent 22cf78d commit 322eb66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/store/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ export const useAccessStore = create<AccessControlStore>()(
return get().needCode;
},
updateCode(code: string) {
set(() => ({ accessCode: code }));
set(() => ({ accessCode: code?.trim() }));
},
updateToken(token: string) {
set(() => ({ token }));
set(() => ({ token: token?.trim() }));
},
updateOpenAiUrl(url: string) {
set(() => ({ openaiUrl: url }));
set(() => ({ openaiUrl: url?.trim() }));
},
isAuthorized() {
get().fetch();
Expand Down

0 comments on commit 322eb66

Please sign in to comment.