Create new thread

This commit is contained in:
2017-06-27 04:15:52 +02:00
parent 4d24b817ff
commit 8758baa0fa
7 changed files with 94 additions and 19 deletions

View File

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