Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
af3a5076
"backend/internal/git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "47a544230a1228545aabf272967dfec2b67ee379"
Commit
af3a5076
authored
Mar 06, 2026
by
erio
Browse files
fix: add load_factor upper bound validation to BulkUpdateAccounts
parent
18f2e214
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/admin_service.go
View file @
af3a5076
...
...
@@ -1635,7 +1635,13 @@ func (s *adminServiceImpl) BulkUpdateAccounts(ctx context.Context, input *BulkUp
repoUpdates
.
RateMultiplier
=
input
.
RateMultiplier
}
if
input
.
LoadFactor
!=
nil
{
repoUpdates
.
LoadFactor
=
input
.
LoadFactor
if
*
input
.
LoadFactor
<=
0
{
repoUpdates
.
LoadFactor
=
nil
// 0 或负数表示清除
}
else
if
*
input
.
LoadFactor
>
10000
{
return
nil
,
errors
.
New
(
"load_factor must be <= 10000"
)
}
else
{
repoUpdates
.
LoadFactor
=
input
.
LoadFactor
}
}
if
input
.
Status
!=
""
{
repoUpdates
.
Status
=
&
input
.
Status
...
...
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