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
1186671a
Commit
1186671a
authored
Apr 27, 2026
by
陈曦
Browse files
修复SecuritySecret, Setting, SubscriptionPlan被保留两遍的问题
parent
3b7a5fff
Pipeline
#82285
passed with stage
in 3 minutes and 14 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
backend/ent/client.go
View file @
1186671a
...
...
@@ -6166,8 +6166,7 @@ type (
ChannelMonitorHistory
,
ChannelMonitorRequestTemplate
,
ErrorPassthroughRule
,
Group
,
IdempotencyRecord
,
IdentityAdoptionDecision
,
PaymentAuditLog
,
PaymentOrder
,
PaymentProviderInstance
,
PendingAuthSession
,
PromoCode
,
RequestCaptureLog
,
SecuritySecret
,
Setting
,
SubscriptionPlan
,
PromoCodeUsage
,
Proxy
,
RedeemCode
,
SecuritySecret
,
Setting
,
SubscriptionPlan
,
PromoCodeUsage
,
Proxy
,
RedeemCode
,
RequestCaptureLog
,
SecuritySecret
,
Setting
,
SubscriptionPlan
,
TLSFingerprintProfile
,
UsageCleanupTask
,
UsageLog
,
User
,
UserAllowedGroup
,
UserAttributeDefinition
,
UserAttributeValue
,
UserSubscription
[]
ent
.
Hook
}
...
...
@@ -6177,8 +6176,7 @@ type (
ChannelMonitorHistory
,
ChannelMonitorRequestTemplate
,
ErrorPassthroughRule
,
Group
,
IdempotencyRecord
,
IdentityAdoptionDecision
,
PaymentAuditLog
,
PaymentOrder
,
PaymentProviderInstance
,
PendingAuthSession
,
PromoCode
,
PromoCodeUsage
,
Proxy
,
RedeemCode
,
SecuritySecret
,
Setting
,
SubscriptionPlan
,
RequestCaptureLog
,
SecuritySecret
,
Setting
,
SubscriptionPlan
,
PromoCodeUsage
,
Proxy
,
RedeemCode
,
RequestCaptureLog
,
SecuritySecret
,
Setting
,
SubscriptionPlan
,
TLSFingerprintProfile
,
UsageCleanupTask
,
UsageLog
,
User
,
UserAllowedGroup
,
UserAttributeDefinition
,
UserAttributeValue
,
UserSubscription
[]
ent
.
Interceptor
}
...
...
backend/internal/handler/openai_gateway_handler.go
View file @
1186671a
...
...
@@ -613,6 +613,20 @@ func (h *OpenAIGatewayHandler) Messages(c *gin.Context) {
subscription
,
_
:=
middleware2
.
GetSubscriptionFromContext
(
c
)
// 异步捕获请求体(仅当该 API Key 开启了 capture_requests)
var
captureID
int64
if
apiKey
.
CaptureRequests
&&
h
.
requestCaptureService
!=
nil
{
requestID
,
_
:=
c
.
Request
.
Context
()
.
Value
(
ctxkey
.
RequestID
)
.
(
string
)
captureID
=
h
.
requestCaptureService
.
Capture
(
apiKey
.
ID
,
subject
.
UserID
,
requestID
,
c
.
Request
.
URL
.
Path
,
c
.
Request
.
Method
,
c
.
ClientIP
(),
body
,
)
}
service
.
SetOpsLatencyMs
(
c
,
service
.
OpsAuthLatencyMsKey
,
time
.
Since
(
requestStart
)
.
Milliseconds
())
routingStart
:=
time
.
Now
()
...
...
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