fix: JSON_CONTAINS 参数类型修复 + API sync
- 修复 JSON_CONTAINS(node_group_ids, int64) 类型错误,改为传 JSON 字符串 - 添加 node_group_ids IS NOT NULL 兼容判断,防止 NULL 列报错 - 同步 apis/ 及 routes.go、compat_types.go 改动 Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -96,6 +96,48 @@ type (
|
||||
Message string `json:"message,omitempty"`
|
||||
Timestamp int64 `json:"timestamp,omitempty"`
|
||||
}
|
||||
GetDownloadLinkRequest {
|
||||
InviteCode string `form:"invite_code,optional"`
|
||||
Platform string `form:"platform" validate:"required,oneof=windows mac ios android"`
|
||||
}
|
||||
GetDownloadLinkResponse {
|
||||
Url string `json:"url"`
|
||||
}
|
||||
ContactRequest {
|
||||
Name string `json:"name" validate:"required,max=100"`
|
||||
Email string `json:"email" validate:"required,email"`
|
||||
OtherContact string `json:"other_contact" validate:"max=200"`
|
||||
Notes string `json:"notes" validate:"max=2000"`
|
||||
}
|
||||
ReportLogMessageRequest {
|
||||
Platform string `json:"platform" validate:"required,max=32"`
|
||||
AppVersion string `json:"app_version" validate:"required,max=64"`
|
||||
OsName string `json:"os_name" validate:"max=64"`
|
||||
OsVersion string `json:"os_version" validate:"max=64"`
|
||||
DeviceId string `json:"device_id" validate:"required,max=255"`
|
||||
UserId int64 `json:"user_id"`
|
||||
SessionId string `json:"session_id" validate:"max=255"`
|
||||
Level uint8 `json:"level"`
|
||||
ErrorCode string `json:"error_code" validate:"max=128"`
|
||||
Message string `json:"message" validate:"required,max=65535"`
|
||||
Stack string `json:"stack" validate:"max=1048576"`
|
||||
Context interface{} `json:"context"`
|
||||
OccurredAt int64 `json:"occurred_at"`
|
||||
}
|
||||
ReportLogMessageResponse {
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
LegacyCheckVerificationCodeRequest {
|
||||
Method string `json:"method" form:"method" validate:"omitempty,oneof=email mobile"`
|
||||
Account string `json:"account" form:"account"`
|
||||
Email string `json:"email" form:"email"`
|
||||
Code string `json:"code" form:"code" validate:"required"`
|
||||
Type uint8 `json:"type" form:"type" validate:"required"`
|
||||
}
|
||||
LegacyCheckVerificationCodeResponse {
|
||||
Status bool `json:"status"`
|
||||
Exist bool `json:"exist"`
|
||||
}
|
||||
)
|
||||
|
||||
@server (
|
||||
@@ -143,5 +185,25 @@ service ppanel {
|
||||
@doc "Heartbeat"
|
||||
@handler Heartbeat
|
||||
get /heartbeat returns (HeartbeatResponse)
|
||||
|
||||
@doc "Get Download Link"
|
||||
@handler GetDownloadLink
|
||||
get /client/download (GetDownloadLinkRequest) returns (GetDownloadLinkResponse)
|
||||
|
||||
@doc "Submit Contact"
|
||||
@handler SubmitContact
|
||||
post /contact (ContactRequest)
|
||||
|
||||
@doc "Report log message"
|
||||
@handler ReportLogMessage
|
||||
post /log/report (ReportLogMessageRequest) returns (ReportLogMessageResponse)
|
||||
|
||||
@doc "Check verification code (legacy v1)"
|
||||
@handler CheckCodeLegacy
|
||||
post /check_code (LegacyCheckVerificationCodeRequest) returns (LegacyCheckVerificationCodeResponse)
|
||||
|
||||
@doc "Check verification code (legacy v2, consume code)"
|
||||
@handler CheckCodeLegacyV2
|
||||
post /check_code/v2 (LegacyCheckVerificationCodeRequest) returns (LegacyCheckVerificationCodeResponse)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user