Use compose, disable major parts of application.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
use super::Response;
|
||||
use crate::util::variables::{DISABLE_REGISTRATION, HCAPTCHA_SITEKEY, USE_EMAIL, USE_HCAPTCHA};
|
||||
|
||||
use rocket_contrib::json::JsonValue;
|
||||
use mongodb::bson::doc;
|
||||
|
||||
/// root
|
||||
#[get("/")]
|
||||
pub async fn root() -> Response {
|
||||
Response::Success(json!({
|
||||
pub async fn root() -> JsonValue {
|
||||
json!({
|
||||
"revolt": "0.3.0-alpha",
|
||||
"features": {
|
||||
"registration": !*DISABLE_REGISTRATION,
|
||||
@@ -16,14 +16,14 @@ pub async fn root() -> Response {
|
||||
},
|
||||
"email": *USE_EMAIL,
|
||||
}
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
/// I'm a teapot.
|
||||
#[delete("/")]
|
||||
pub async fn teapot() -> Response {
|
||||
Response::Teapot(json!({
|
||||
pub async fn teapot() -> JsonValue {
|
||||
json!({
|
||||
"teapot": true,
|
||||
"can_delete": false
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user