mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-16 20:01:35 +01:00
fix log issue
This commit is contained in:
parent
fb91857899
commit
f54b942fd7
@ -150,7 +150,7 @@ func (ua *UserAPI) Post() {
|
|||||||
user := models.User{Username: req.UserName, Email: req.Email, Realname: req.Realname, Password: req.Password, Comment: req.Comment}
|
user := models.User{Username: req.UserName, Email: req.Email, Realname: req.Realname, Password: req.Password, Comment: req.Comment}
|
||||||
exist, err := dao.UserExists(user, "email")
|
exist, err := dao.UserExists(user, "email")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Error occurred in UserExists:", err)
|
log.Errorf("Error occurred in UserExists: %v", err)
|
||||||
}
|
}
|
||||||
if exist {
|
if exist {
|
||||||
ua.RenderError(http.StatusConflict, "")
|
ua.RenderError(http.StatusConflict, "")
|
||||||
@ -159,7 +159,7 @@ func (ua *UserAPI) Post() {
|
|||||||
|
|
||||||
userID, err := dao.Register(user)
|
userID, err := dao.Register(user)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Error occurred in Register:", err)
|
log.Errorf("Error occurred in Register: %v", err)
|
||||||
ua.RenderError(http.StatusInternalServerError, "Internal error.")
|
ua.RenderError(http.StatusInternalServerError, "Internal error.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user