Some checks failed
Build docker and publish / build (20.15.1) (push) Failing after 8m21s
31 lines
823 B
Go
31 lines
823 B
Go
package common
|
|
|
|
import (
|
|
"context"
|
|
"github.com/perfect-panel/server/internal/svc"
|
|
"github.com/perfect-panel/server/internal/types"
|
|
"github.com/perfect-panel/server/pkg/logger"
|
|
)
|
|
|
|
type CheckVerificationCodeLogic struct {
|
|
logger.Logger
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
}
|
|
|
|
// Check verification code
|
|
func NewCheckVerificationCodeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CheckVerificationCodeLogic {
|
|
return &CheckVerificationCodeLogic{
|
|
Logger: logger.WithContext(ctx),
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (l *CheckVerificationCodeLogic) CheckVerificationCode(req *types.CheckVerificationCodeRequest) (resp *types.CheckVerificationCodeRespone, err error) {
|
|
return l.CheckVerificationCodeWithBehavior(req, VerifyCodeCheckBehavior{
|
|
Source: "canonical",
|
|
Consume: true,
|
|
})
|
|
}
|