vanguard maps added
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -77,6 +77,16 @@ class MapData {
|
||||
60: Map(id: 60, name: "Zoo", imageName: "bocw_zoo"),
|
||||
|
||||
|
||||
|
||||
|
||||
61: Map(id: 61, name: "Champion Hill", imageName: "vg_championhill"),
|
||||
62: Map(id: 62, name: "Hotel Royal", imageName: "vg_hotel"),
|
||||
63: Map(id: 63, name: "Red Star", imageName: "vg_redstar"),
|
||||
64: Map(id: 64, name: "Gavutu", imageName: "vg_gavutu"),
|
||||
65: Map(id: 65, name: "Eagle’s Nest", imageName: "vg_eaglesnest"),
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
||||
static let bocwMaps = {
|
||||
@@ -90,6 +100,14 @@ class MapData {
|
||||
}
|
||||
static let mwMaps = {
|
||||
return [9,10,11,12,13,14,15,28,16,17,18,19,20,21,22,23,24,25,26,27,32,33,36,37].compactMap {
|
||||
return allMaps[$0]
|
||||
}.sorted { (m1, m2) -> Bool in
|
||||
return m1.name < m2.name
|
||||
}
|
||||
}
|
||||
|
||||
static let vgMaps = {
|
||||
return [61,62,63,64,65].compactMap {
|
||||
return allMaps[$0];
|
||||
}.sorted { (m1, m2) -> Bool in
|
||||
return m1.name < m2.name
|
||||
@@ -97,5 +115,4 @@ class MapData {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user