add magrider to api response
This commit is contained in:
parent
84409cd67a
commit
871edfc96f
1 changed files with 11 additions and 3 deletions
|
@ -33,6 +33,7 @@ struct Vehicles {
|
||||||
chimera: u32,
|
chimera: u32,
|
||||||
javelin: u32,
|
javelin: u32,
|
||||||
corsair: u32,
|
corsair: u32,
|
||||||
|
magrider: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/w/<world_id>/vehicles")]
|
#[get("/w/<world_id>/vehicles")]
|
||||||
|
@ -66,7 +67,7 @@ pub async fn get_vehicles(world_id: String, mut con: Connection<RedisPool>) -> s
|
||||||
galaxy,
|
galaxy,
|
||||||
valkyrie,
|
valkyrie,
|
||||||
liberator,
|
liberator,
|
||||||
ant,
|
ant
|
||||||
): (u32, u32, u32, u32, u32, u32, u32, u32, u32, u32, u32, u32) = pipe()
|
): (u32, u32, u32, u32, u32, u32, u32, u32, u32, u32, u32, u32) = pipe()
|
||||||
.zcount(
|
.zcount(
|
||||||
format!("v:{}/{}", world_id, "flash"),
|
format!("v:{}/{}", world_id, "flash"),
|
||||||
|
@ -132,7 +133,7 @@ pub async fn get_vehicles(world_id: String, mut con: Connection<RedisPool>) -> s
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let (harasser, dervish, chimera, javelin, corsair): (u32, u32, u32, u32, u32) = pipe()
|
let (harasser, dervish, chimera, javelin, corsair, magrider): (u32, u32, u32, u32, u32, u32) = pipe()
|
||||||
.zcount(
|
.zcount(
|
||||||
format!("v:{}/{}", world_id, "harasser"),
|
format!("v:{}/{}", world_id, "harasser"),
|
||||||
filter_timestamp,
|
filter_timestamp,
|
||||||
|
@ -158,6 +159,11 @@ pub async fn get_vehicles(world_id: String, mut con: Connection<RedisPool>) -> s
|
||||||
filter_timestamp,
|
filter_timestamp,
|
||||||
"+inf",
|
"+inf",
|
||||||
)
|
)
|
||||||
|
.zcount(
|
||||||
|
format!("v:{}/{}", world_id, "magrider"),
|
||||||
|
filter_timestamp,
|
||||||
|
"+inf",
|
||||||
|
)
|
||||||
.query_async(&mut *con)
|
.query_async(&mut *con)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
@ -178,7 +184,8 @@ pub async fn get_vehicles(world_id: String, mut con: Connection<RedisPool>) -> s
|
||||||
+ dervish
|
+ dervish
|
||||||
+ chimera
|
+ chimera
|
||||||
+ javelin
|
+ javelin
|
||||||
+ corsair;
|
+ corsair
|
||||||
|
+ magrider;
|
||||||
|
|
||||||
let response = VehiclesCounts {
|
let response = VehiclesCounts {
|
||||||
world_id,
|
world_id,
|
||||||
|
@ -201,6 +208,7 @@ pub async fn get_vehicles(world_id: String, mut con: Connection<RedisPool>) -> s
|
||||||
chimera,
|
chimera,
|
||||||
javelin,
|
javelin,
|
||||||
corsair,
|
corsair,
|
||||||
|
magrider
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue