Improved error logging
This commit is contained in:
@ -15,7 +15,7 @@ func AMVFile(ctx *aero.Context) string {
|
||||
amvID := ctx.Get("id")
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in", nil)
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in")
|
||||
}
|
||||
|
||||
amv, err := arn.GetAMV(amvID)
|
||||
|
@ -15,7 +15,7 @@ func AnimeImage(ctx *aero.Context) string {
|
||||
animeID := ctx.Get("id")
|
||||
|
||||
if user == nil || (user.Role != "editor" && user.Role != "admin") {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not authorized", nil)
|
||||
return ctx.Error(http.StatusUnauthorized, "Not authorized")
|
||||
}
|
||||
|
||||
anime, err := arn.GetAnime(animeID)
|
||||
|
@ -12,7 +12,7 @@ func Avatar(ctx *aero.Context) string {
|
||||
user := utils.GetUser(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in", nil)
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in")
|
||||
}
|
||||
|
||||
// Retrieve file from post body
|
||||
|
@ -15,7 +15,7 @@ func CharacterImage(ctx *aero.Context) string {
|
||||
characterID := ctx.Get("id")
|
||||
|
||||
if user == nil || (user.Role != "editor" && user.Role != "admin") {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not authorized", nil)
|
||||
return ctx.Error(http.StatusUnauthorized, "Not authorized")
|
||||
}
|
||||
|
||||
character, err := arn.GetCharacter(characterID)
|
||||
|
@ -12,11 +12,11 @@ func Cover(ctx *aero.Context) string {
|
||||
user := utils.GetUser(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in", nil)
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in")
|
||||
}
|
||||
|
||||
if !user.IsPro() {
|
||||
return ctx.Error(http.StatusUnauthorized, "Only available for PRO users", nil)
|
||||
return ctx.Error(http.StatusUnauthorized, "Only available for PRO users")
|
||||
}
|
||||
|
||||
// Retrieve file from post body
|
||||
|
Reference in New Issue
Block a user