diff options
Diffstat (limited to 'db')
| -rw-r--r-- | db/db.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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") |
