mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-12-03 14:51:05 +01:00
feat(be): user count implementation for boltdb
Some checks are pending
Dev / build-local (push) Waiting to run
Dev / migrate-boltdb (push) Blocked by required conditions
Dev / migrate-mysql (push) Blocked by required conditions
Dev / migrate-mariadb (push) Blocked by required conditions
Dev / migrate-postgres (push) Blocked by required conditions
Dev / integrate-boltdb (push) Blocked by required conditions
Dev / integrate-mysql (push) Blocked by required conditions
Dev / integrate-mariadb (push) Blocked by required conditions
Dev / integrate-postgres (push) Blocked by required conditions
Dev / deploy-server (push) Blocked by required conditions
Dev / deploy-runner (push) Blocked by required conditions
Some checks are pending
Dev / build-local (push) Waiting to run
Dev / migrate-boltdb (push) Blocked by required conditions
Dev / migrate-mysql (push) Blocked by required conditions
Dev / migrate-mariadb (push) Blocked by required conditions
Dev / migrate-postgres (push) Blocked by required conditions
Dev / integrate-boltdb (push) Blocked by required conditions
Dev / integrate-mysql (push) Blocked by required conditions
Dev / integrate-mariadb (push) Blocked by required conditions
Dev / integrate-postgres (push) Blocked by required conditions
Dev / deploy-server (push) Blocked by required conditions
Dev / deploy-runner (push) Blocked by required conditions
This commit is contained in:
parent
b2f615bb1b
commit
36e7e6f884
@ -177,6 +177,12 @@ func (d *BoltDb) GetUser(userID int) (user db.User, err error) {
|
||||
}
|
||||
|
||||
func (d *BoltDb) GetUserCount() (count int, err error) {
|
||||
var users []db.User
|
||||
err = d.getObjects(0, db.UserProps, db.RetrieveQueryParams{}, nil, &users)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
count = len(users)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user