added account

This commit is contained in:
2025-10-25 15:55:25 +02:00
parent 72c50549d7
commit 4db5084bc6
15 changed files with 1214 additions and 150 deletions

View File

@@ -2,13 +2,15 @@ package handlers
import (
"html/template"
"mealprep/auth"
"mealprep/database"
"net/http"
)
// GroceryListHandler handles the grocery list page
func GroceryListHandler(w http.ResponseWriter, r *http.Request) {
groceryItems, err := database.GetGroceryList()
userID := auth.GetUserID(r)
groceryItems, err := database.GetGroceryList(userID)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return