diff options
author | Michael Hunteman <michael@huntm.net> | 2024-10-20 18:52:16 -0700 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2024-10-20 18:52:16 -0700 |
commit | 5a65b3a653eb4a9ca62332fa65c8d352e6dc782f (patch) | |
tree | 6f2fabb06936a7290a2f5e94a1b3aaf4534bf87c /server/admin | |
parent | 5c8f0ca091ff7f962260c75a0ffe4c99e7cdca3c (diff) |
Use UUID
Diffstat (limited to 'server/admin')
-rw-r--r-- | server/admin/models.go | 1 | ||||
-rw-r--r-- | server/admin/store.go | 2 |
2 files changed, 2 insertions, 1 deletions
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 } |