32 lines
786 B
Go
Raw Normal View History

2017-06-16 23:25:02 +00:00
package profile
2017-06-08 12:46:38 +00:00
2018-11-24 06:57:52 +00:00
// import (
// "net/http"
2017-06-08 12:46:38 +00:00
2018-11-24 06:57:52 +00:00
// "github.com/aerogo/aero"
// "github.com/animenotifier/arn"
// "github.com/animenotifier/notify.moe/components"
// "github.com/animenotifier/notify.moe/utils"
// )
2017-06-08 12:46:38 +00:00
2018-11-24 06:57:52 +00:00
// const maxThreads = 20
2017-07-03 15:33:57 +00:00
2018-11-24 06:57:52 +00:00
// // GetThreadsByUser shows all forum threads of a particular user.
// func GetThreadsByUser(ctx *aero.Context) string {
// nick := ctx.Get("nick")
// viewUser, err := arn.GetUserByNick(nick)
2017-06-08 12:46:38 +00:00
2018-11-24 06:57:52 +00:00
// if err != nil {
// return ctx.Error(http.StatusNotFound, "User not found", err)
// }
2017-06-08 12:46:38 +00:00
2018-11-24 06:57:52 +00:00
// threads := viewUser.Threads()
// arn.SortThreadsLatestFirst(threads)
2017-06-08 12:46:38 +00:00
2018-11-24 06:57:52 +00:00
// if len(threads) > maxThreads {
// threads = threads[:maxThreads]
// }
2017-07-03 15:33:57 +00:00
2018-11-24 06:57:52 +00:00
// return ctx.HTML(components.ProfileThreads(threads, viewUser, utils.GetUser(ctx), ctx.URI()))
// }