Added new support page

This commit is contained in:
2018-03-04 16:53:42 +01:00
parent 057dab988c
commit a3b7e4b3de
8 changed files with 97 additions and 1 deletions

20
pages/support/support.go Normal file
View File

@ -0,0 +1,20 @@
package support
import (
"net/http"
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/utils"
)
// Get support page.
func Get(ctx *aero.Context) string {
user := utils.GetUser(ctx)
if user == nil {
return ctx.Error(http.StatusUnauthorized, "Not logged in", nil)
}
return ctx.HTML(components.Support(user))
}