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
603b361f
Commit
603b361f
authored
Jan 04, 2026
by
IanShaw027
Browse files
fix(test): 修复 api_contract_test 的接口签名和参数问题
parent
2632a710
Changes
1
Show whitespace changes
Inline
Side-by-side
backend/internal/server/api_contract_test.go
View file @
603b361f
...
...
@@ -380,7 +380,7 @@ func newContractDeps(t *testing.T) *contractDeps {
apiKeyService
:=
service
.
NewApiKeyService
(
apiKeyRepo
,
userRepo
,
groupRepo
,
userSubRepo
,
apiKeyCache
,
cfg
)
usageRepo
:=
newStubUsageLogRepo
()
usageService
:=
service
.
NewUsageService
(
usageRepo
,
userRepo
,
client
)
usageService
:=
service
.
NewUsageService
(
usageRepo
,
userRepo
,
nil
)
settingRepo
:=
newStubSettingRepo
()
settingService
:=
service
.
NewSettingService
(
settingRepo
,
cfg
)
...
...
@@ -863,8 +863,8 @@ func (r *stubUsageLogRepo) SetUserLogs(userID int64, logs []service.UsageLog) {
r
.
userLogs
[
userID
]
=
logs
}
func
(
r
*
stubUsageLogRepo
)
Create
(
ctx
context
.
Context
,
log
*
service
.
UsageLog
)
error
{
return
errors
.
New
(
"not implemented"
)
func
(
r
*
stubUsageLogRepo
)
Create
(
ctx
context
.
Context
,
log
*
service
.
UsageLog
)
(
bool
,
error
)
{
return
false
,
errors
.
New
(
"not implemented"
)
}
func
(
r
*
stubUsageLogRepo
)
GetByID
(
ctx
context
.
Context
,
id
int64
)
(
*
service
.
UsageLog
,
error
)
{
...
...
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