diff options
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 } |