update db name

This commit is contained in:
Odweta
2026-03-19 11:29:34 +01:00
parent 9f9bf3e366
commit 83e6c4e0a3
+2 -2
View File
@@ -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)