fix gitea workflow path and runner label
Build docker and publish / build (20.15.1) (push) Failing after 7m57s

This commit is contained in:
2026-03-04 07:02:51 -08:00
parent a01570b59d
commit 149dfe1ac3
11 changed files with 303 additions and 53 deletions
@@ -5,12 +5,23 @@ import (
"github.com/perfect-panel/server/internal/logic/common"
"github.com/perfect-panel/server/internal/svc"
"github.com/perfect-panel/server/internal/types"
"github.com/perfect-panel/server/pkg/constant"
"github.com/perfect-panel/server/pkg/result"
)
// Check verification code
func CheckVerificationCodeHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
return CheckVerificationCodeV1Handler(svcCtx)
}
func CheckVerificationCodeV1Handler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
return checkVerificationCodeHandler(svcCtx, false)
}
func CheckVerificationCodeV2Handler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
return checkVerificationCodeHandler(svcCtx, true)
}
func checkVerificationCodeHandler(svcCtx *svc.ServiceContext, consume bool) func(c *gin.Context) {
return func(c *gin.Context) {
var req types.CheckVerificationCodeRequest
_ = c.ShouldBind(&req)
@@ -21,14 +32,9 @@ func CheckVerificationCodeHandler(svcCtx *svc.ServiceContext) func(c *gin.Contex
}
l := common.NewCheckVerificationCodeLogic(c.Request.Context(), svcCtx)
useLatest := false
if value, ok := c.Request.Context().Value(constant.CtxKeyAPIVersionUseLatest).(bool); ok {
useLatest = value
}
resp, err := l.CheckVerificationCodeWithBehavior(&req, common.VerifyCodeCheckBehavior{
Source: "canonical",
Consume: useLatest,
Consume: consume,
})
result.HttpResult(c, resp, err)
}