aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/routes
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/src/routes')
-rw-r--r--planetwars-server/src/routes/matches.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/planetwars-server/src/routes/matches.rs b/planetwars-server/src/routes/matches.rs
index c1957d4..1b7581c 100644
--- a/planetwars-server/src/routes/matches.rs
+++ b/planetwars-server/src/routes/matches.rs
@@ -35,7 +35,6 @@ pub struct ApiMatchPlayer {
pub struct ListRecentMatchesParams {
count: Option<usize>,
// TODO: should timezone be specified here?
- // TODO: implement these
before: Option<NaiveDateTime>,
after: Option<NaiveDateTime>,
@@ -58,9 +57,9 @@ pub async fn list_recent_matches(
Some(bot_name) => {
let bot = db::bots::find_bot_by_name(&bot_name, &conn)
.map_err(|_| StatusCode::BAD_REQUEST)?;
- matches::list_bot_matches(bot.id, count, &conn)
+ matches::list_bot_matches(bot.id, count, params.before, params.after, &conn)
}
- None => matches::list_public_matches(count, &conn),
+ None => matches::list_public_matches(count, params.before, params.after, &conn),
};
matches