diff --git a/app/http/middleware/authenticateguild.go b/app/http/middleware/authenticateguild.go index 6eb5af5..32837d8 100644 --- a/app/http/middleware/authenticateguild.go +++ b/app/http/middleware/authenticateguild.go @@ -16,13 +16,13 @@ func AuthenticateGuild(isApiMethod bool) gin.HandlerFunc { parsed, err := strconv.ParseUint(guildId, 10, 64) if err != nil { if isApiMethod { - ctx.Redirect(302, config.Conf.Server.BaseUrl) // TODO: 404 Page - ctx.Abort() - } else { ctx.AbortWithStatusJSON(400, gin.H{ "success": false, "error": "Invalid guild ID", }) + } else { + ctx.Redirect(302, config.Conf.Server.BaseUrl) // TODO: 404 Page + ctx.Abort() } return }