vanguard maps added

This commit is contained in:
Michael Simard
2021-09-16 10:13:11 -05:00
parent 20f91e25db
commit 4688588b56
2 changed files with 19 additions and 4 deletions

View File

@@ -27,13 +27,11 @@ struct StatsController: RouteCollection {
statsRoute.get("maps","game",":game","competitive",":competitive",use: mapRecords)
statsRoute.get("maps","game",":game","competitive",":competitive", "gamemode", ":gamemode",use: mapRecords)
statsRoute.get("dashboard", use: dashboard)
statsRoute.get("stats","q",":query", use: history)
}
func dashboard(db: Database) throws -> EventLoopFuture<DashboardStats> {
func dashboard(db: Database) throws -> EventLoopFuture<DashboardStats> {
let statistics = WinLossRecords.query(on: db).all()
let adamAffectedMatches = Match.query(on: db).filter(\.$finalKillRuinedPlayerId == 6).count()
let totalMWGames = Match.query(on: db).filter(\.$codGame == "mw").count()