From 5a65b3a653eb4a9ca62332fa65c8d352e6dc782f Mon Sep 17 00:00:00 2001 From: Michael Hunteman Date: Sun, 20 Oct 2024 18:52:16 -0700 Subject: Use UUID --- server/admin/models.go | 1 + server/admin/store.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'server/admin') diff --git a/server/admin/models.go b/server/admin/models.go index 1699381..275f617 100644 --- a/server/admin/models.go +++ b/server/admin/models.go @@ -6,6 +6,7 @@ import ( ) type Admin struct { + Id string `json:"id"` Username string `json:"username"` Password string `json:"password"` } diff --git a/server/admin/store.go b/server/admin/store.go index f36b342..65b905a 100644 --- a/server/admin/store.go +++ b/server/admin/store.go @@ -36,7 +36,7 @@ func (store Store) Find(requestAdmin Admin) (Admin, error) { func createAdmin(requestAdmin Admin, adminRows pgx.Rows) (Admin, bool) { var databaseAdmin Admin for adminRows.Next() { - err := adminRows.Scan(&databaseAdmin.Username, &databaseAdmin.Password) + err := adminRows.Scan(&databaseAdmin.Id, &databaseAdmin.Username, &databaseAdmin.Password) if err != nil { return Admin{}, false } -- cgit v1.2.3