21 lines
411 B
Go
Raw Normal View History

2017-06-18 15:16:40 +00:00
package settings
import (
2017-06-21 00:51:55 +00:00
"net/http"
2017-06-18 15:16:40 +00:00
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/utils"
)
// Get user settings page.
func Get(ctx *aero.Context) string {
user := utils.GetUser(ctx)
if user == nil {
2017-06-21 00:51:55 +00:00
return ctx.Error(http.StatusForbidden, "Not logged in", nil)
2017-06-18 15:16:40 +00:00
}
2017-06-24 19:07:45 +00:00
return utils.AllowEmbed(ctx, ctx.HTML(components.Settings(user)))
2017-06-18 15:16:40 +00:00
}