added account
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user