From 83e6c4e0a3071d9c6d441febde98d64caee62e79 Mon Sep 17 00:00:00 2001 From: Odweta Date: Thu, 19 Mar 2026 11:29:34 +0100 Subject: [PATCH] update db name --- backend/handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/handlers.go b/backend/handlers.go index 7772983..52e2017 100644 --- a/backend/handlers.go +++ b/backend/handlers.go @@ -10,7 +10,7 @@ import ( // GET /quotes func getQuotes(w http.ResponseWriter, r *http.Request) { - rows, err := db.Query(context.Background(), "SELECT * FROM quotes") + rows, err := db.Query(context.Background(), "SELECT * FROM hlaskovnik") if err != nil { http.Error(w, err.Error(), 500) return @@ -41,7 +41,7 @@ func createQuote(w http.ResponseWriter, r *http.Request) { err = db.QueryRow( context.Background(), - "INSERT INTO quotes(author, body) VALUES($1, $2) RETURNING id", + "INSERT INTO hlaskovnik(author, body) VALUES($1, $2) RETURNING id", q.Author, q.Body, ).Scan(&q.Id)