Refactor to use aerogo/database

This commit is contained in:
2017-10-27 09:11:56 +02:00
parent c0d7b0d2df
commit b07a98ed32
18 changed files with 52 additions and 164 deletions

View File

@ -64,11 +64,7 @@ func Finish(ctx *aero.Context) string {
animeList.Import(item)
}
err := animeList.Save()
if err != nil {
return ctx.Error(http.StatusInternalServerError, "Error saving your anime list", err)
}
animeList.Save()
return ctx.Redirect("/+" + user.Nick + "/animelist")
}

View File

@ -77,11 +77,7 @@ func Finish(ctx *aero.Context) string {
animeList.Import(item)
}
err := animeList.Save()
if err != nil {
return ctx.Error(http.StatusInternalServerError, "Error saving your anime list", err)
}
animeList.Save()
return ctx.Redirect("/+" + user.Nick + "/animelist")
}

View File

@ -73,11 +73,7 @@ func Finish(ctx *aero.Context) string {
animeList.Import(item)
}
err := animeList.Save()
if err != nil {
return ctx.Error(http.StatusInternalServerError, "Error saving your anime list", err)
}
animeList.Save()
return ctx.Redirect("/+" + user.Nick + "/animelist")
}