This commit is contained in:
konrad 2018-08-30 19:14:16 +02:00 committed by kolaente
parent 478c98fb8d
commit 76f3357a0c
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
3 changed files with 22 additions and 22 deletions

View file

@ -61,10 +61,10 @@ func userAddOrUpdate(c echo.Context) error {
var exists bool
_, err := models.GetUserByID(datUser.ID)
if err != nil {
if models.IsErrUserDoesNotExist(err) {
exists = true
} else {
return c.JSON(http.StatusInternalServerError, models.Message{"Could not check if the user exists."})
if models.IsErrUserDoesNotExist(err) {
exists = true
} else {
return c.JSON(http.StatusInternalServerError, models.Message{"Could not check if the user exists."})
}
}