change mapConfigs button to getMapConfigs

This commit is contained in:
Michael Simard
2021-10-31 00:11:38 -05:00
parent 8ece62ac13
commit c88098e05e

View File

@@ -740,7 +740,7 @@ struct StatsController: RouteCollection {
let matches = Match.query(on: db).sort( \.$date).all() let matches = Match.query(on: db).sort( \.$date).all()
let mapConfigs = mapConfigs(db: db) let mapConfigs = getMapConfigs(db: db)
return matches.and(dashboardStats).and(mapConfigs).map { arg -> (OverallStats) in return matches.and(dashboardStats).and(mapConfigs).map { arg -> (OverallStats) in
@@ -804,7 +804,7 @@ struct StatsController: RouteCollection {
} }
func mapConfigs(db: Database) -> EventLoopFuture<[MapConfig]> { func getMapConfigs(db: Database) -> EventLoopFuture<[MapConfig]> {
return Map.query(on: db).all().map { map in return Map.query(on: db).all().map { map in
return map.map { m in return map.map { m in
@@ -819,7 +819,7 @@ struct StatsController: RouteCollection {
let matches = Match.query(on: req.db).all() let matches = Match.query(on: req.db).all()
let mapConfigs = mapConfigs(db: req.db) let mapConfigs = getMapConfigs(db: req.db)
return matches.and(mapConfigs).map { matches, mapConfigs in return matches.and(mapConfigs).map { matches, mapConfigs in