2454
This commit is contained in:
@@ -209,6 +209,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/user/decryptMobile",
|
||||
Handler: user.DecryptMobileHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// mobile code login
|
||||
Method: http.MethodPost,
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"qnc-server/app/user/cmd/api/internal/logic/user"
|
||||
"qnc-server/app/user/cmd/api/internal/svc"
|
||||
"qnc-server/common/result"
|
||||
)
|
||||
|
||||
func DecryptMobileHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := user.NewDecryptMobileLogic(r.Context(), svcCtx)
|
||||
err := l.DecryptMobile()
|
||||
result.HttpResult(r, w, nil, err)
|
||||
}
|
||||
}
|
||||
28
app/user/cmd/api/internal/logic/user/decryptmobilelogic.go
Normal file
28
app/user/cmd/api/internal/logic/user/decryptmobilelogic.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"qnc-server/app/user/cmd/api/internal/svc"
|
||||
)
|
||||
|
||||
type DecryptMobileLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewDecryptMobileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DecryptMobileLogic {
|
||||
return &DecryptMobileLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DecryptMobileLogic) DecryptMobile() error {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user