feat: add runnersViaSelfservice to statsControllerGet
This commit is contained in:
@@ -23,6 +23,7 @@ export class StatsController {
|
||||
@OpenAPI({ description: "A very basic stats endpoint providing basic counters for a dashboard or simmilar" })
|
||||
async get() {
|
||||
const connection = getConnection();
|
||||
const runnersViaSelfservice = await connection.getRepository(Runner).count({ where: { created_via: "selfservice" } });
|
||||
const runners = await connection.getRepository(Runner).count();
|
||||
const teams = await connection.getRepository(RunnerTeam).count();
|
||||
const orgs = await connection.getRepository(RunnerOrganization).count();
|
||||
@@ -41,7 +42,7 @@ export class StatsController {
|
||||
let donations = await connection.getRepository(Donation).find({ relations: ['runner', 'runner.scans', 'runner.scans.track'] });
|
||||
const donors = await connection.getRepository(Donor).count();
|
||||
|
||||
return new ResponseStats(runners, teams, orgs, users, scans, donations, distace, donors)
|
||||
return new ResponseStats(runnersViaSelfservice, runners, teams, orgs, users, scans, donations, distace, donors)
|
||||
}
|
||||
|
||||
@Get("/runners/distance")
|
||||
|
||||
Reference in New Issue
Block a user