1
0

Added MindflowAdmin page handler and updated mindflow.Post.

This commit is contained in:
Alexander Andreev 2023-05-10 03:17:58 +04:00
parent 14e25fe088
commit ee486aefdf
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -50,11 +50,18 @@ func (h *Handlers) Stuff(w http.ResponseWriter, r *http.Request) {
func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) {
posts := []mindflow.Post{
{Category: "Kek", Date: time.Now(), Title: "LMAO", Body: "Testing!"},
{Category: mindflow.Category{ID: 1, Name: "Update"}, Date: time.Now(), Title: "LMAO", Body: "Testing!"},
}
web.Mindflow("/ Mindflow", posts, r, w)
}
func (h *Handlers) MindflowAdmin(w http.ResponseWriter, r *http.Request) {
posts := []mindflow.Post{
{Category: mindflow.Category{ID: 1, Name: "Update"}, Date: time.Now(), Title: "LMAO", Body: "Testing!"},
}
web.MindflowAdmin("/ Mindflow Administration", posts, r, w)
}
func (h *Handlers) About(w http.ResponseWriter, r *http.Request) {
var lst servicestat.ServiceList = make(servicestat.ServiceList)
reimu, err := servicestat.GatherStatus("http://reimu.arav.home.arpa:14882/processes")
@ -135,7 +142,7 @@ func (h *Handlers) GuestbookAdmin(w http.ResponseWriter, r *http.Request) {
func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) {
posts := []mindflow.Post{
{Category: "Kek", Date: time.Now(), Title: "LMAO", Body: "Testing!"},
{Category: mindflow.Category{ID: 1, Name: "Update"}, Date: time.Now(), Title: "LMAO", Body: "Testing!"},
}
web.RSS(r.URL.Scheme+"://"+r.Host, "Arav", posts, r, w)
}