Switch to async Rust and break all logic.

This commit is contained in:
Paul Makles
2020-12-27 13:28:37 +00:00
parent 5711986768
commit 6cfec0ee08
26 changed files with 1141 additions and 1256 deletions

View File

@@ -5,7 +5,7 @@ use mongodb::bson::doc;
/// root
#[get("/")]
pub fn root() -> Response {
pub async fn root() -> Response {
Response::Success(json!({
"revolt": "0.2.11",
"features": {
@@ -19,14 +19,9 @@ pub fn root() -> Response {
}))
}
#[options("/")]
pub fn root_preflight() -> Response {
Response::Result(super::Status::Ok)
}
/// I'm a teapot.
#[delete("/")]
pub fn teapot() -> Response {
pub async fn teapot() -> Response {
Response::Teapot(json!({
"teapot": true,
"can_delete": false