Fixing up the go code, adding initial work for the stats pages, adding a function to pre-populate the database with some example polls for testing. Will be removed later

This commit is contained in:
2026-01-25 19:45:56 -05:00
parent 8b5940741c
commit b39a094d92
11 changed files with 821 additions and 337 deletions

View File

@@ -5,6 +5,11 @@ import (
"net/http"
)
const (
DATE_FORMAT = "2006-01-02 15:04:05"
SUCCESS = "success"
)
func SendError(w http.ResponseWriter, errStr string, statusCode int) {
w.WriteHeader(statusCode)
json.NewEncoder(w).Encode(map[string]string{"error": errStr})