Use temporary redirects
This commit is contained in:
@ -19,7 +19,7 @@ func Get(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
|
||||
if user == nil || (user.Role != "admin" && user.Role != "editor") {
|
||||
return ctx.Redirect(http.StatusFound, "/")
|
||||
return ctx.Redirect(http.StatusTemporaryRedirect, "/")
|
||||
}
|
||||
|
||||
// // CPU
|
||||
|
@ -15,5 +15,5 @@ func Redirect(ctx aero.Context) error {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in")
|
||||
}
|
||||
|
||||
return ctx.Redirect(http.StatusFound, "/+" + user.Nick + ctx.Path())
|
||||
return ctx.Redirect(http.StatusTemporaryRedirect, "/+" + user.Nick + ctx.Path())
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ func Get(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
|
||||
if user == nil || (user.Role != "admin" && user.Role != "editor") {
|
||||
return ctx.Redirect(http.StatusFound, "/")
|
||||
return ctx.Redirect(http.StatusTemporaryRedirect, "/")
|
||||
}
|
||||
|
||||
ignoreDifferences := arn.FilterIgnoreAnimeDifferences(func(entry *arn.IgnoreAnimeDifference) bool {
|
||||
|
@ -16,7 +16,7 @@ func NoDescription(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
|
||||
if user == nil || (user.Role != "admin" && user.Role != "editor") {
|
||||
return ctx.Redirect(http.StatusFound, "/")
|
||||
return ctx.Redirect(http.StatusTemporaryRedirect, "/")
|
||||
}
|
||||
|
||||
companies := arn.FilterCompanies(func(company *arn.Company) bool {
|
||||
|
Reference in New Issue
Block a user