Migrate the rest of the code.

This commit is contained in:
Paul
2021-08-04 10:11:21 +01:00
committed by Paul Makles
parent 9fec4e48c0
commit 382972ea22
12 changed files with 49 additions and 216 deletions

View File

@@ -4,7 +4,7 @@ use crate::util::{ratelimit::RateLimitGuard, variables::{
}};
use mongodb::bson::doc;
use rocket::serde::json::Value;
use rocket::{http::Status, serde::json::Value};
use rocket_governor::RocketGovernor;
#[get("/")]
@@ -37,3 +37,8 @@ pub async fn root(_limitguard: RocketGovernor<'_, RateLimitGuard>) -> Value {
"vapid": *VAPID_PUBLIC_KEY
})
}
#[get("/ping")]
pub async fn ping(_limitguard: RocketGovernor<'_, RateLimitGuard>) -> Status {
Status::Ok
}