Пример #1
0
func AddTopic(w http.ResponseWriter, req *http.Request) {
	conf := utils.GetStruct()
	conf.Publisher = req.FormValue("publisher")
	topic1 := req.FormValue("topic1")
	topic2 := req.FormValue("topic2")
	topic3 := req.FormValue("topic3")

	conf.Topics = append(conf.Topics, topic1, topic2, topic3)
	conf.Flush()
	views.RenderSubscription(w, views.SuccessPage, nil)
}
Пример #2
0
func PSHBHandler(w http.ResponseWriter, req *http.Request) {
	conf := utils.GetData()
	views.RenderSubscription(w, views.AdminPage, conf)
}