diff --git a/go-backend/internal/utils/response_handler.go b/go-backend/internal/utils/response_handler.go index 9611f51..5aca8c6 100644 --- a/go-backend/internal/utils/response_handler.go +++ b/go-backend/internal/utils/response_handler.go @@ -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) { if err.Error() == "record not found" { RespondWithError(c, err, "Couldn't find user", http.StatusNotFound, errors.Responses.Fields.User, errors.Responses.Keys.NotFound)