mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 10:15: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}
|
||||
exist, err := dao.UserExists(user, "email")
|
||||
if err != nil {
|
||||
log.Errorf("Error occurred in UserExists:", err)
|
||||
log.Errorf("Error occurred in UserExists: %v", err)
|
||||
}
|
||||
if exist {
|
||||
ua.RenderError(http.StatusConflict, "")
|
||||
@ -159,7 +159,7 @@ func (ua *UserAPI) Post() {
|
||||
|
||||
userID, err := dao.Register(user)
|
||||
if err != nil {
|
||||
log.Errorf("Error occurred in Register:", err)
|
||||
log.Errorf("Error occurred in Register: %v", err)
|
||||
ua.RenderError(http.StatusInternalServerError, "Internal error.")
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user