feat(static): ✨ Add terms of service page and update routes
* Implement ServeTermsOfService handler to serve the terms of service page. * Update index.html and privacy-policy.html to include links to the terms of service. * Add logo1024.png for branding.
This commit is contained in:
@@ -31,6 +31,20 @@ func (h *Handlers) ServeIndex(w http.ResponseWriter, r *http.Request) {
|
||||
writeBytes(w, content)
|
||||
}
|
||||
|
||||
// ServeTermsOfService serves the terms of service page
|
||||
func (h *Handlers) ServeTermsOfService(w http.ResponseWriter, r *http.Request) {
|
||||
content, err := staticFiles.ReadFile("static/terms-of-service.html")
|
||||
if err != nil {
|
||||
logging.Error("Failed to read terms-of-service.html", "error", err)
|
||||
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
writeBytes(w, content)
|
||||
}
|
||||
|
||||
// ServePrivacyPolicy serves the privacy policy page
|
||||
func (h *Handlers) ServePrivacyPolicy(w http.ResponseWriter, r *http.Request) {
|
||||
content, err := staticFiles.ReadFile("static/privacy-policy.html")
|
||||
|
||||
Reference in New Issue
Block a user