Disable old profile pages

This commit is contained in:
2018-11-24 15:57:52 +09:00
parent 5668c66b31
commit cfb481df52
18 changed files with 280 additions and 283 deletions

View File

@ -1,26 +1,26 @@
package profile
import (
"net/http"
// import (
// "net/http"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/utils"
)
// "github.com/aerogo/aero"
// "github.com/animenotifier/arn"
// "github.com/animenotifier/notify.moe/components"
// "github.com/animenotifier/notify.moe/utils"
// )
// GetFollowers shows the followers of a particular user.
func GetFollowers(ctx *aero.Context) string {
nick := ctx.Get("nick")
viewUser, err := arn.GetUserByNick(nick)
// // GetFollowers shows the followers of a particular user.
// func GetFollowers(ctx *aero.Context) string {
// nick := ctx.Get("nick")
// viewUser, err := arn.GetUserByNick(nick)
if err != nil {
return ctx.Error(http.StatusNotFound, "User not found", err)
}
// if err != nil {
// return ctx.Error(http.StatusNotFound, "User not found", err)
// }
followers := viewUser.Followers()
arn.SortUsersLastSeenFirst(followers)
// followers := viewUser.Followers()
// arn.SortUsersLastSeenFirst(followers)
return ctx.HTML(components.ProfileFollowers(followers, viewUser, utils.GetUser(ctx), ctx.URI()))
// return ctx.HTML(components.ProfileFollowers(followers, viewUser, utils.GetUser(ctx), ctx.URI()))
}
// }