mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-08 23:23:42 +08:00
修复令牌bug
This commit is contained in:
@@ -377,14 +377,14 @@ const TokensTable = () => {
|
||||
};
|
||||
|
||||
const searchTokens = async () => {
|
||||
if (searchKeyword === '') {
|
||||
if (searchKeyword === '' && searchToken === '') {
|
||||
// if keyword is blank, load files instead.
|
||||
await loadTokens(0);
|
||||
setActivePage(1);
|
||||
return;
|
||||
}
|
||||
setSearching(true);
|
||||
const res = await API.get(`/api/token/search?keyword=${searchKeyword}`);
|
||||
const res = await API.get(`/api/token/search?keyword=${searchKeyword}&token=${searchToken}`);
|
||||
const {success, message, data} = res.data;
|
||||
if (success) {
|
||||
setTokensFormat(data);
|
||||
|
||||
Reference in New Issue
Block a user