summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/db.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/db/db.go b/db/db.go
index 6fed1b0..228a655 100644
--- a/db/db.go
+++ b/db/db.go
@@ -315,6 +315,11 @@ func (d *DB) getAccountByUsername(ctx context.Context, username string) (*Accoun
return &acct, nil
}
+// GetAccount fetches the current tokens for a username.
+func (d *DB) GetAccount(ctx context.Context, username string) (*Account, error) {
+ return d.getAccountByUsername(ctx, username)
+}
+
// HealthCheck runs a trivial query to verify DB liveness.
func (d *DB) HealthCheck(ctx context.Context) error {
_, err := d.conn.ExecContext(ctx, "SELECT 1")