From a33f685f3c3182dce639789678c654f57bc9a1c1 Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Wed, 3 Apr 2024 23:57:49 +0800 Subject: [PATCH] fix: log page type error (close #154) --- controller/misc.go | 4 ++-- web/src/components/LogsTable.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/controller/misc.go b/controller/misc.go index 71c7419..630ad93 100644 --- a/controller/misc.go +++ b/controller/misc.go @@ -120,14 +120,14 @@ func SendEmailVerification(c *gin.Context) { }) return } - if config.EmailDomainRestrictionEnabled { + if common.EmailDomainRestrictionEnabled { parts := strings.Split(email, "@") localPart := parts[0] domainPart := parts[1] containsSpecialSymbols := strings.Contains(localPart, "+") || strings.Count(localPart, ".") > 1 allowed := false - for _, domain := range config.EmailDomainWhitelist { + for _, domain := range common.EmailDomainWhitelist { if domainPart == domain { allowed = true break diff --git a/web/src/components/LogsTable.js b/web/src/components/LogsTable.js index 57003e0..9331fa7 100644 --- a/web/src/components/LogsTable.js +++ b/web/src/components/LogsTable.js @@ -471,10 +471,10 @@ const LogsTable = () => { }); }; - const refresh = async (localLogType) => { + const refresh = async () => { // setLoading(true); setActivePage(1); - await loadLogs(0, pageSize, localLogType); + await loadLogs(0, pageSize, logType); }; const copyText = async (text) => { @@ -635,7 +635,7 @@ const LogsTable = () => { style={{ width: 120 }} onChange={(value) => { setLogType(parseInt(value)); - refresh(parseInt(value)).then(); + loadLogs(0, pageSize, parseInt(value)); }} > 全部