Merge pull request #2431 from Hopelwj/main

设置页面-参数过滤空格
This commit is contained in:
Yifei Zhang 2023-07-19 20:14:13 +08:00 committed by GitHub
commit f535073ae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();