del obsolete handleVerifyUserError
This commit is contained in:
@@ -81,18 +81,6 @@ func HandleSubscriptionUpdateError(c *gin.Context, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func HandleVerifyUserError(c *gin.Context, err error) {
|
|
||||||
if err.Error() == "record not found" {
|
|
||||||
RespondWithError(c, err, "Couldn't find verification. This is most probably a outdated token.", http.StatusGone, errors.Responses.Fields.User, errors.Responses.Keys.NoAuthToken)
|
|
||||||
}
|
|
||||||
switch err {
|
|
||||||
case errors.ErrAlreadyVerified:
|
|
||||||
RespondWithError(c, err, "User already changed password", http.StatusConflict, errors.Responses.Fields.User, errors.Responses.Keys.PasswordAlreadyChanged)
|
|
||||||
default:
|
|
||||||
RespondWithError(c, err, "Couldn't verify user", http.StatusInternalServerError, errors.Responses.Fields.General, errors.Responses.Keys.InternalServerError)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func HandleDeleteUserError(c *gin.Context, err error) {
|
func HandleDeleteUserError(c *gin.Context, err error) {
|
||||||
if err.Error() == "record not found" {
|
if err.Error() == "record not found" {
|
||||||
RespondWithError(c, err, "Couldn't find user", http.StatusNotFound, errors.Responses.Fields.User, errors.Responses.Keys.NotFound)
|
RespondWithError(c, err, "Couldn't find user", http.StatusNotFound, errors.Responses.Fields.User, errors.Responses.Keys.NotFound)
|
||||||
|
|||||||
Reference in New Issue
Block a user