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
df1c2383
Commit
df1c2383
authored
Feb 03, 2026
by
shaw
Browse files
chore: fix gofmt formatting
parent
ff8b1b4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/handler/gateway_handler.go
View file @
df1c2383
...
@@ -510,14 +510,14 @@ func (h *GatewayHandler) Messages(c *gin.Context) {
...
@@ -510,14 +510,14 @@ func (h *GatewayHandler) Messages(c *gin.Context) {
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
10
*
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
10
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
if
err
:=
h
.
gatewayService
.
RecordUsage
(
ctx
,
&
service
.
RecordUsageInput
{
if
err
:=
h
.
gatewayService
.
RecordUsage
(
ctx
,
&
service
.
RecordUsageInput
{
Result
:
result
,
Result
:
result
,
APIKey
:
currentAPIKey
,
APIKey
:
currentAPIKey
,
User
:
currentAPIKey
.
User
,
User
:
currentAPIKey
.
User
,
Account
:
usedAccount
,
Account
:
usedAccount
,
Subscription
:
currentSubscription
,
Subscription
:
currentSubscription
,
UserAgent
:
ua
,
UserAgent
:
ua
,
IPAddress
:
clientIP
,
IPAddress
:
clientIP
,
APIKeyService
:
h
.
apiKeyService
,
APIKeyService
:
h
.
apiKeyService
,
});
err
!=
nil
{
});
err
!=
nil
{
log
.
Printf
(
"Record usage failed: %v"
,
err
)
log
.
Printf
(
"Record usage failed: %v"
,
err
)
}
}
...
...
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