1
0

Added a mockup for RSS. Made use of GetServiceByHost() func.

This commit is contained in:
Alexander Andreev 2023-02-05 06:25:22 +04:00
parent 6a0e64dbf5
commit fb38f13262
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -7,6 +7,7 @@ import (
"git.arav.top/Arav/dwelling-home/pkg/mindflow" "git.arav.top/Arav/dwelling-home/pkg/mindflow"
"git.arav.top/Arav/dwelling-home/pkg/servicestat" "git.arav.top/Arav/dwelling-home/pkg/servicestat"
"git.arav.top/Arav/dwelling-home/pkg/util"
"git.arav.top/Arav/dwelling-home/web" "git.arav.top/Arav/dwelling-home/web"
) )
@ -59,7 +60,7 @@ func (h *Handlers) About(w http.ResponseWriter, r *http.Request) {
} }
} }
web.About("/ About", "", lst, w) web.About("/ About", util.GetServiceByHost(r.Host, util.ServiceFiles), lst, w)
} }
func (h *Handlers) Article(w http.ResponseWriter, r *http.Request) { func (h *Handlers) Article(w http.ResponseWriter, r *http.Request) {
@ -74,7 +75,10 @@ func (h *Handlers) Article(w http.ResponseWriter, r *http.Request) {
} }
func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) { func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) {
web.RSS(r.Host, "Arav", nil, r, w) posts := []mindflow.Post{
{Category: "Kek", Date: time.Now(), Title: "LMAO", Body: "Testing!"},
}
web.RSS(r.URL.Scheme+"://"+r.Host, "Arav", posts, r, w)
} }
func (h *Handlers) Robots(w http.ResponseWriter, r *http.Request) { func (h *Handlers) Robots(w http.ResponseWriter, r *http.Request) {