Add terms and FAQ

This commit is contained in:
Joakim Hellsén 2024-02-04 22:04:22 +01:00
commit 0bc687a538
6 changed files with 227 additions and 3 deletions

View file

@ -59,6 +59,7 @@ func main() {
r.Get("/donate", DonateHandler)
r.Get("/feeds", FeedsHandler)
r.Get("/privacy", PrivacyHandler)
r.Get("/terms", TermsHandler)
r.Post("/add", AddFeedHandler)
r.Handle("/static/*", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
@ -220,6 +221,10 @@ func PrivacyHandler(w http.ResponseWriter, _ *http.Request) {
renderPage(w, "Privacy", "Privacy Page", "privacy, page", "TheLovinator", "http://localhost:8000/privacy", "privacy")
}
func TermsHandler(w http.ResponseWriter, _ *http.Request) {
renderPage(w, "Terms", "Terms and Conditions Page", "terms, page", "TheLovinator", "http://localhost:8000/terms", "terms")
}
// Run some simple validation on the URL
func validateURL(feed_url string) error {
// Check if URL starts with http or https