This commit is contained in:
2017-06-17 01:25:02 +02:00
parent a9f88db566
commit 88614d412b
12 changed files with 18 additions and 18 deletions

View File

@ -6,7 +6,7 @@ import (
"github.com/animenotifier/notify.moe/components"
)
// Get ...
// Get thread.
func Get(ctx *aero.Context) string {
id := ctx.Get("id")
thread, err := arn.GetThread(id)

View File

@ -1,24 +0,0 @@
package threads
import (
"net/http"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
)
// GetByUser ...
func GetByUser(ctx *aero.Context) string {
nick := ctx.Get("nick")
user, err := arn.GetUserByNick(nick)
if err != nil {
return ctx.Error(http.StatusNotFound, "User not found", err)
}
threads := user.Threads()
arn.SortThreadsByDate(threads)
return ctx.HTML(components.ThreadList(threads))
}