fix gitea workflow path and runner label
Build docker and publish / build (20.15.1) (push) Failing after 7m57s
Build docker and publish / build (20.15.1) (push) Failing after 7m57s
This commit is contained in:
@@ -11,6 +11,18 @@ import (
|
||||
|
||||
// Check legacy verification code
|
||||
func CheckCodeLegacyHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
return CheckCodeLegacyV1Handler(svcCtx)
|
||||
}
|
||||
|
||||
func CheckCodeLegacyV1Handler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
return checkCodeLegacyHandler(svcCtx, false)
|
||||
}
|
||||
|
||||
func CheckCodeLegacyV2Handler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
return checkCodeLegacyHandler(svcCtx, true)
|
||||
}
|
||||
|
||||
func checkCodeLegacyHandler(svcCtx *svc.ServiceContext, consume bool) func(c *gin.Context) {
|
||||
return func(c *gin.Context) {
|
||||
var req types.LegacyCheckVerificationCodeRequest
|
||||
_ = c.ShouldBind(&req)
|
||||
@@ -27,14 +39,9 @@ func CheckCodeLegacyHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
}
|
||||
|
||||
l := commonLogic.NewCheckVerificationCodeLogic(c.Request.Context(), svcCtx)
|
||||
useLatest := false
|
||||
if value, ok := c.Request.Context().Value(constant.CtxKeyAPIVersionUseLatest).(bool); ok {
|
||||
useLatest = value
|
||||
}
|
||||
|
||||
resp, err := l.CheckVerificationCodeWithBehavior(normalizedReq, commonLogic.VerifyCodeCheckBehavior{
|
||||
Source: "legacy",
|
||||
Consume: useLatest,
|
||||
Consume: consume,
|
||||
LegacyType3Mapped: legacyType3Mapped,
|
||||
AllowSceneFallback: constant.ParseVerifyType(normalizedReq.Type) != constant.DeleteAccount,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user