Changeset 0.28.6 (#192)
This commit is contained in:
@@ -122,6 +122,23 @@ func (s *UserStore) SetActive(ctx context.Context, id string, active bool) error
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *UserStore) ListActiveUserIDs(ctx context.Context) ([]string, error) {
|
||||
rows, err := DB.QueryContext(ctx, "SELECT id FROM users WHERE is_active = true")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var ids []string
|
||||
for rows.Next() {
|
||||
var id string
|
||||
if err := rows.Scan(&id); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ids = append(ids, id)
|
||||
}
|
||||
return ids, rows.Err()
|
||||
}
|
||||
|
||||
// ── Refresh Tokens ──────────────────────────
|
||||
|
||||
func (s *UserStore) CreateRefreshToken(ctx context.Context, userID, tokenHash string, expiresAt time.Time) error {
|
||||
|
||||
Reference in New Issue
Block a user