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
ad460096
Commit
ad460096
authored
Apr 22, 2026
by
IanShaw027
Browse files
fix(ci): clean up lint and dead code
parent
82259d13
Changes
8
Hide whitespace changes
Inline
Side-by-side
backend/internal/handler/auth_oauth_pending_flow.go
View file @
ad460096
...
...
@@ -265,18 +265,6 @@ func pendingSessionWantsInvitation(payload map[string]any) bool {
return
strings
.
EqualFold
(
strings
.
TrimSpace
(
pendingSessionStringValue
(
payload
,
"error"
)),
"invitation_required"
)
}
func
pendingOAuthCompletionIncludesTokenPayload
(
payload
map
[
string
]
any
)
bool
{
if
len
(
payload
)
==
0
{
return
false
}
for
_
,
key
:=
range
[]
string
{
"access_token"
,
"refresh_token"
}
{
if
value
:=
pendingSessionStringValue
(
payload
,
key
);
value
!=
""
{
return
true
}
}
return
false
}
func
pendingOAuthCompletionCanIssueTokenPair
(
session
*
dbent
.
PendingAuthSession
,
payload
map
[
string
]
any
)
bool
{
if
session
==
nil
{
return
false
...
...
backend/internal/repository/migrations_runner.go
View file @
ad460096
...
...
@@ -301,7 +301,9 @@ func findDuplicatePaymentOrderOutTradeNos(ctx context.Context, db *sql.DB) ([]st
if
err
!=
nil
{
return
nil
,
err
}
defer
rows
.
Close
()
defer
func
()
{
_
=
rows
.
Close
()
}()
duplicates
:=
make
([]
string
,
0
,
5
)
for
rows
.
Next
()
{
...
...
backend/internal/repository/user_repo.go
View file @
ad460096
...
...
@@ -739,10 +739,6 @@ func (r *userRepository) ExistsByEmail(ctx context.Context, email string) (bool,
return
r
.
client
.
User
.
Query
()
.
Where
(
userEmailLookupPredicate
(
email
))
.
Exist
(
ctx
)
}
func
(
r
*
userRepository
)
ensureNormalizedEmailAvailable
(
ctx
context
.
Context
,
userID
int64
,
email
string
)
error
{
return
ensureNormalizedEmailAvailableWithClient
(
ctx
,
clientFromContext
(
ctx
,
r
.
client
),
userID
,
email
)
}
func
ensureNormalizedEmailAvailableWithClient
(
ctx
context
.
Context
,
client
*
dbent
.
Client
,
userID
int64
,
email
string
)
error
{
client
=
clientFromContext
(
ctx
,
client
)
if
client
==
nil
{
...
...
backend/internal/repository/user_repo_email_lookup_unit_test.go
View file @
ad460096
...
...
@@ -209,10 +209,10 @@ func TestUserRepositoryCreateSerializesNormalizedEmailConflictsUnderConcurrency(
successes
:=
0
conflicts
:=
0
for
_
,
err
:=
range
errors
{
switch
{
case
err
==
nil
:
switch
err
{
case
nil
:
successes
++
case
err
==
service
.
ErrEmailExists
:
case
service
.
ErrEmailExists
:
conflicts
++
default
:
t
.
Fatalf
(
"unexpected create error: %v"
,
err
)
...
...
backend/internal/service/payment_service.go
View file @
ad460096
...
...
@@ -281,15 +281,6 @@ func newLegacyAwarePaymentResumeService(legacyKey []byte) *PaymentResumeService
return
NewPaymentResumeService
(
signingKey
,
verifyFallbacks
...
)
}
func
psResumeSigningKey
(
configService
*
PaymentConfigService
)
[]
byte
{
signingKey
,
_
:=
psResumeSigningKeys
(
configService
)
return
signingKey
}
func
psResumeSigningKeys
(
configService
*
PaymentConfigService
)
([]
byte
,
[][]
byte
)
{
return
resolvePaymentResumeSigningKeys
(
psResumeLegacyVerificationKey
(
configService
))
}
func
psResumeLegacyVerificationKey
(
configService
*
PaymentConfigService
)
[]
byte
{
if
configService
==
nil
{
return
nil
...
...
backend/internal/service/payment_visible_method_instances.go
View file @
ad460096
...
...
@@ -131,21 +131,6 @@ func selectVisibleMethodInstanceByProviderKey(instances []*dbent.PaymentProvider
return
nil
}
func
buildPaymentProviderConflictError
(
method
string
,
conflicting
*
dbent
.
PaymentProviderInstance
)
error
{
metadata
:=
map
[
string
]
string
{
"payment_method"
:
NormalizeVisibleMethod
(
method
),
}
if
conflicting
!=
nil
{
metadata
[
"conflicting_provider_id"
]
=
fmt
.
Sprintf
(
"%d"
,
conflicting
.
ID
)
metadata
[
"conflicting_provider_key"
]
=
conflicting
.
ProviderKey
metadata
[
"conflicting_provider_name"
]
=
conflicting
.
Name
}
return
infraerrors
.
Conflict
(
"PAYMENT_PROVIDER_CONFLICT"
,
fmt
.
Sprintf
(
"%s payment already has an enabled provider instance"
,
NormalizeVisibleMethod
(
method
)),
)
.
WithMetadata
(
metadata
)
}
func
(
s
*
PaymentConfigService
)
validateVisibleMethodEnablementConflicts
(
ctx
context
.
Context
,
excludeID
int64
,
...
...
frontend/src/components/layout/__tests__/AppSidebar.spec.ts
View file @
ad460096
...
...
@@ -21,7 +21,7 @@ describe('AppSidebar custom SVG styles', () => {
describe
(
'
AppSidebar header styles
'
,
()
=>
{
it
(
'
does not clip the version badge dropdown
'
,
()
=>
{
const
sidebarHeaderBlockMatch
=
styleSource
.
match
(
/
\.
sidebar-header
\s
*
\{[\s\S]
*
?\n
\}
/
)
const
sidebarHeaderBlockMatch
=
styleSource
.
match
(
/
\.
sidebar-header
\s
*
\{[\s\S]
*
?\n
{2}
\}
/
)
const
sidebarBrandBlockMatch
=
componentSource
.
match
(
/
\.
sidebar-brand
\s
*
\{[\s\S]
*
?\n\}
/
)
expect
(
sidebarHeaderBlockMatch
).
not
.
toBeNull
()
...
...
frontend/src/views/admin/__tests__/SettingsView.spec.ts
View file @
ad460096
import
{
beforeEach
,
describe
,
expect
,
it
,
vi
}
from
"
vitest
"
;
import
{
defineComponent
,
h
,
ref
}
from
"
vue
"
;
import
{
defineComponent
,
h
}
from
"
vue
"
;
import
{
flushPromises
,
mount
}
from
"
@vue/test-utils
"
;
import
SettingsView
from
"
../SettingsView.vue
"
;
...
...
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