fix: useAccessStore filter spaces

This commit is contained in:
liuweijie 2023-07-18 19:38:16 +08:00
parent 22cf78d506
commit 322eb66fdf

View File

@ -48,13 +48,13 @@ export const useAccessStore = create<AccessControlStore>()(
return get().needCode; return get().needCode;
}, },
updateCode(code: string) { updateCode(code: string) {
set(() => ({ accessCode: code })); set(() => ({ accessCode: code?.trim() }));
}, },
updateToken(token: string) { updateToken(token: string) {
set(() => ({ token })); set(() => ({ token: token?.trim() }));
}, },
updateOpenAiUrl(url: string) { updateOpenAiUrl(url: string) {
set(() => ({ openaiUrl: url })); set(() => ({ openaiUrl: url?.trim() }));
}, },
isAuthorized() { isAuthorized() {
get().fetch(); get().fetch();