fix: log page type error (close #154)

This commit is contained in:
CaIon 2024-04-03 23:57:49 +08:00
parent 3d0f77ffb6
commit a33f685f3c
2 changed files with 5 additions and 5 deletions

View File

@ -120,14 +120,14 @@ func SendEmailVerification(c *gin.Context) {
}) })
return return
} }
if config.EmailDomainRestrictionEnabled { if common.EmailDomainRestrictionEnabled {
parts := strings.Split(email, "@") parts := strings.Split(email, "@")
localPart := parts[0] localPart := parts[0]
domainPart := parts[1] domainPart := parts[1]
containsSpecialSymbols := strings.Contains(localPart, "+") || strings.Count(localPart, ".") > 1 containsSpecialSymbols := strings.Contains(localPart, "+") || strings.Count(localPart, ".") > 1
allowed := false allowed := false
for _, domain := range config.EmailDomainWhitelist { for _, domain := range common.EmailDomainWhitelist {
if domainPart == domain { if domainPart == domain {
allowed = true allowed = true
break break

View File

@ -471,10 +471,10 @@ const LogsTable = () => {
}); });
}; };
const refresh = async (localLogType) => { const refresh = async () => {
// setLoading(true); // setLoading(true);
setActivePage(1); setActivePage(1);
await loadLogs(0, pageSize, localLogType); await loadLogs(0, pageSize, logType);
}; };
const copyText = async (text) => { const copyText = async (text) => {
@ -635,7 +635,7 @@ const LogsTable = () => {
style={{ width: 120 }} style={{ width: 120 }}
onChange={(value) => { onChange={(value) => {
setLogType(parseInt(value)); setLogType(parseInt(value));
refresh(parseInt(value)).then(); loadLogs(0, pageSize, parseInt(value));
}} }}
> >
<Select.Option value='0'>全部</Select.Option> <Select.Option value='0'>全部</Select.Option>