From 603b361fb9d31df5c5b078d1a88f468565f747cd Mon Sep 17 00:00:00 2001 From: IanShaw027 <131567472+IanShaw027@users.noreply.github.com> Date: Sun, 4 Jan 2026 17:21:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(test):=20=E4=BF=AE=E5=A4=8D=20api=5Fcontrac?= =?UTF-8?q?t=5Ftest=20=E7=9A=84=E6=8E=A5=E5=8F=A3=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E5=92=8C=E5=8F=82=E6=95=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/server/api_contract_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/internal/server/api_contract_test.go b/backend/internal/server/api_contract_test.go index 1cf05dc7..46c3aba9 100644 --- a/backend/internal/server/api_contract_test.go +++ b/backend/internal/server/api_contract_test.go @@ -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) {