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
57ebe382
"frontend/src/git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "ff86154a03e237969665c3b3c8a89dfdb7718679"
Commit
57ebe382
authored
Mar 01, 2026
by
erio
Browse files
fix: remove dead code in BulkUpdateAccounts group binding loop
parent
73089bbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/admin_service.go
View file @
57ebe382
...
@@ -1539,9 +1539,8 @@ func (s *adminServiceImpl) BulkUpdateAccounts(ctx context.Context, input *BulkUp
...
@@ -1539,9 +1539,8 @@ func (s *adminServiceImpl) BulkUpdateAccounts(ctx context.Context, input *BulkUp
needMixedChannelCheck
:=
input
.
GroupIDs
!=
nil
&&
!
input
.
SkipMixedChannelCheck
needMixedChannelCheck
:=
input
.
GroupIDs
!=
nil
&&
!
input
.
SkipMixedChannelCheck
// 预加载账号平台信息(混合渠道检查
或 Sora 同步
需要)。
// 预加载账号平台信息(混合渠道检查需要)。
platformByID
:=
map
[
int64
]
string
{}
platformByID
:=
map
[
int64
]
string
{}
groupAccountsByID
:=
map
[
int64
][]
Account
{}
if
needMixedChannelCheck
{
if
needMixedChannelCheck
{
accounts
,
err
:=
s
.
accountRepo
.
GetByIDs
(
ctx
,
input
.
AccountIDs
)
accounts
,
err
:=
s
.
accountRepo
.
GetByIDs
(
ctx
,
input
.
AccountIDs
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -1608,7 +1607,6 @@ func (s *adminServiceImpl) BulkUpdateAccounts(ctx context.Context, input *BulkUp
...
@@ -1608,7 +1607,6 @@ func (s *adminServiceImpl) BulkUpdateAccounts(ctx context.Context, input *BulkUp
// Handle group bindings per account (requires individual operations).
// Handle group bindings per account (requires individual operations).
for
_
,
accountID
:=
range
input
.
AccountIDs
{
for
_
,
accountID
:=
range
input
.
AccountIDs
{
entry
:=
BulkUpdateAccountResult
{
AccountID
:
accountID
}
entry
:=
BulkUpdateAccountResult
{
AccountID
:
accountID
}
platform
:=
""
if
input
.
GroupIDs
!=
nil
{
if
input
.
GroupIDs
!=
nil
{
if
err
:=
s
.
accountRepo
.
BindGroups
(
ctx
,
accountID
,
*
input
.
GroupIDs
);
err
!=
nil
{
if
err
:=
s
.
accountRepo
.
BindGroups
(
ctx
,
accountID
,
*
input
.
GroupIDs
);
err
!=
nil
{
...
@@ -1619,9 +1617,6 @@ func (s *adminServiceImpl) BulkUpdateAccounts(ctx context.Context, input *BulkUp
...
@@ -1619,9 +1617,6 @@ func (s *adminServiceImpl) BulkUpdateAccounts(ctx context.Context, input *BulkUp
result
.
Results
=
append
(
result
.
Results
,
entry
)
result
.
Results
=
append
(
result
.
Results
,
entry
)
continue
continue
}
}
if
!
input
.
SkipMixedChannelCheck
&&
platform
!=
""
{
updateMixedChannelPreloadedAccounts
(
groupAccountsByID
,
*
input
.
GroupIDs
,
accountID
,
platform
)
}
}
}
entry
.
Success
=
true
entry
.
Success
=
true
...
...
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