Improved error logging

This commit is contained in:
2018-07-07 12:42:00 +09:00
parent bf544836fa
commit e46c9b1586
41 changed files with 69 additions and 65 deletions

View File

@ -14,7 +14,7 @@ func CountUnseen(ctx *aero.Context) string {
user := utils.GetUser(ctx)
if user == nil {
return ctx.Error(http.StatusBadRequest, "Not logged in", nil)
return ctx.Error(http.StatusBadRequest, "Not logged in")
}
unseen := user.Notifications().CountUnseen()
@ -27,7 +27,7 @@ func MarkNotificationsAsSeen(ctx *aero.Context) string {
user := utils.GetUser(ctx)
if user == nil {
return ctx.Error(http.StatusBadRequest, "Not logged in", nil)
return ctx.Error(http.StatusBadRequest, "Not logged in")
}
notifications := user.Notifications().Notifications()
@ -45,7 +45,7 @@ func Test(ctx *aero.Context) string {
user := utils.GetUser(ctx)
if user == nil {
return ctx.Error(http.StatusBadRequest, "Not logged in", nil)
return ctx.Error(http.StatusBadRequest, "Not logged in")
}
user.SendNotification(&arn.PushNotification{