Upgraded to latest aero version

This commit is contained in:
2019-06-01 13:55:49 +09:00
parent ae591e5e7e
commit 28db818c37
196 changed files with 645 additions and 593 deletions

View File

@ -10,7 +10,7 @@ import (
)
// AMVFile handles the video upload for AMV files.
func AMVFile(ctx *aero.Context) string {
func AMVFile(ctx aero.Context) error {
user := utils.GetUser(ctx)
amvID := ctx.Get("id")
@ -45,5 +45,5 @@ func AMVFile(ctx *aero.Context) string {
logEntry := arn.NewEditLogEntry(user.ID, "edit", "AMV", amv.ID, "File", "", "")
logEntry.Save()
return "ok"
return nil
}

View File

@ -10,7 +10,7 @@ import (
)
// AnimeImage handles the anime image upload.
func AnimeImage(ctx *aero.Context) string {
func AnimeImage(ctx aero.Context) error {
user := utils.GetUser(ctx)
animeID := ctx.Get("id")
@ -45,5 +45,5 @@ func AnimeImage(ctx *aero.Context) string {
logEntry := arn.NewEditLogEntry(user.ID, "edit", "Anime", anime.ID, "Image", "", "")
logEntry.Save()
return "ok"
return nil
}

View File

@ -8,7 +8,7 @@ import (
)
// Avatar handles the avatar upload.
func Avatar(ctx *aero.Context) string {
func Avatar(ctx aero.Context) error {
user := utils.GetUser(ctx)
if user == nil {
@ -32,5 +32,5 @@ func Avatar(ctx *aero.Context) string {
// Save avatar information
user.Save()
return user.AvatarLink("small")
return ctx.Text(user.AvatarLink("small"))
}

View File

@ -10,7 +10,7 @@ import (
)
// CharacterImage handles the character image upload.
func CharacterImage(ctx *aero.Context) string {
func CharacterImage(ctx aero.Context) error {
user := utils.GetUser(ctx)
characterID := ctx.Get("id")
@ -45,5 +45,5 @@ func CharacterImage(ctx *aero.Context) string {
logEntry := arn.NewEditLogEntry(user.ID, "edit", "Character", character.ID, "Image", "", "")
logEntry.Save()
return "ok"
return nil
}

View File

@ -8,7 +8,7 @@ import (
)
// Cover handles the cover image upload.
func Cover(ctx *aero.Context) string {
func Cover(ctx aero.Context) error {
user := utils.GetUser(ctx)
if user == nil {
@ -36,5 +36,5 @@ func Cover(ctx *aero.Context) string {
// Save cover image information
user.Save()
return "ok"
return nil
}

View File

@ -9,7 +9,7 @@ import (
)
// GroupImage handles the group image upload.
func GroupImage(ctx *aero.Context) string {
func GroupImage(ctx aero.Context) error {
user := utils.GetUser(ctx)
groupID := ctx.Get("id")
@ -44,5 +44,5 @@ func GroupImage(ctx *aero.Context) string {
logEntry := arn.NewEditLogEntry(user.ID, "edit", "Group", group.ID, "Image", "", "")
logEntry.Save()
return "ok"
return nil
}