redirect to /login

This commit is contained in:
Dot-Rar 2020-03-20 22:15:46 +00:00
parent 2f71ed5d29
commit 67ad07f3f4
7 changed files with 14 additions and 0 deletions

View File

@ -104,5 +104,7 @@ func BlacklistHandler(ctx *gin.Context) {
"userNotFound": userNotFound,
"isStaff": isStaff,
})
} else {
ctx.Redirect(302, "/login")
}
}

View File

@ -59,5 +59,7 @@ func BlacklistRemoveHandler(ctx *gin.Context) {
}
ctx.Redirect(302, fmt.Sprintf("/manage/%s/blacklist", guildIdStr))
} else {
ctx.Redirect(302, "/login")
}
}

View File

@ -140,5 +140,7 @@ func PanelHandler(ctx *gin.Context) {
"created": ctx.Query("created") == "true",
"metQuota": ctx.Query("metQuota") == "true",
})
} else {
ctx.Redirect(302, "/login")
}
}

View File

@ -76,6 +76,8 @@ func SendMessage(ctx *gin.Context) {
Content: content,
}, nil)
}
} else {
ctx.Redirect(302, "/login")
}
ctx.Redirect(301, ctx.Request.URL.String())

View File

@ -105,5 +105,7 @@ func TicketListHandler(ctx *gin.Context) {
"baseUrl": config.Conf.Server.BaseUrl,
"tickets": ticketsFormatted,
})
} else {
ctx.Redirect(302, "/login")
}
}

View File

@ -127,5 +127,7 @@ func TicketViewHandler(ctx *gin.Context) {
"include_mock": true,
"premium": <-premium,
})
} else {
ctx.Redirect(302, "/login")
}
}

View File

@ -82,5 +82,7 @@ func LogViewHandler(ctx *gin.Context) {
ctx.String(200, string(content))
}
} else {
ctx.Redirect(302, "/login")
}
}