Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ca170cf7
authored
Apr 03, 2024
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: log page type error (close #154)
parent
354e1df3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
controller/misc.go
+2
-2
web/src/components/LogsTable.js
+3
-3
No files found.
controller/misc.go
View file @
ca170cf7
...
@@ -120,14 +120,14 @@ func SendEmailVerification(c *gin.Context) {
...
@@ -120,14 +120,14 @@ func SendEmailVerification(c *gin.Context) {
})
})
return
return
}
}
if
co
nfig
.
EmailDomainRestrictionEnabled
{
if
co
mmon
.
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
co
nfig
.
EmailDomainWhitelist
{
for
_
,
domain
:=
range
co
mmon
.
EmailDomainWhitelist
{
if
domainPart
==
domain
{
if
domainPart
==
domain
{
allowed
=
true
allowed
=
true
break
break
...
...
web/src/components/LogsTable.js
View file @
ca170cf7
...
@@ -471,10 +471,10 @@ const LogsTable = () => {
...
@@ -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
,
lo
calLo
gType
);
await
loadLogs
(
0
,
pageSize
,
logType
);
};
};
const
copyText
=
async
(
text
)
=>
{
const
copyText
=
async
(
text
)
=>
{
...
@@ -635,7 +635,7 @@ const LogsTable = () => {
...
@@ -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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment