mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-15 00:36:56 +08:00
fix: improve trading and UI
This commit is contained in:
@@ -111,6 +111,13 @@ func (s *UserStore) GetByID(userID string) (*User, error) {
|
||||
return &user, nil
|
||||
}
|
||||
|
||||
// Count returns the total number of users
|
||||
func (s *UserStore) Count() (int, error) {
|
||||
var count int
|
||||
err := s.db.QueryRow(`SELECT COUNT(*) FROM users`).Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
// GetAllIDs gets all user IDs
|
||||
func (s *UserStore) GetAllIDs() ([]string, error) {
|
||||
rows, err := s.db.Query(`SELECT id FROM users ORDER BY id`)
|
||||
|
||||
Reference in New Issue
Block a user