feat: 管理后台登录
Some checks failed
Backend Deploy (Go + Docker) / deploy (push) Successful in 1m4s
Extension Build & Release / build (push) Failing after 46s

This commit is contained in:
zs
2026-03-02 23:54:59 +08:00
parent 4e5147fb13
commit d2b330c0c9
7 changed files with 115 additions and 5 deletions

View File

@@ -18,6 +18,7 @@ func NewUserHandler(svc *service.UserService) *UserHandler {
func (h *UserHandler) Register(w http.ResponseWriter, r *http.Request) {
var body struct {
Email string `json:"email"`
Password string `json:"password"`
Identity string `json:"identity"`
}
@@ -26,7 +27,7 @@ func (h *UserHandler) Register(w http.ResponseWriter, r *http.Request) {
return
}
user, err := h.svc.Register(body.Email, body.Identity)
user, err := h.svc.Register(body.Email, body.Password, body.Identity)
if err != nil {
SendError(w, http.StatusInternalServerError, 5001, "Failed to register user")
return