Add hCaptcha support.

This commit is contained in:
Paul Makles
2020-08-13 13:06:06 +02:00
parent 8ee867eec7
commit f44180a980
7 changed files with 75 additions and 5 deletions

View File

@@ -1,16 +1,20 @@
use super::Response;
use mongodb::bson::doc;
use std::env;
/// root
#[get("/")]
pub fn root() -> Response {
Response::Success(json!({
"revolt": "0.2.8",
"revolt": "0.2.9",
"version": {
"major": 0,
"minor": 2,
"patch": 8
"patch": 9
},
"features": {
"captcha": env::var("HCAPTCHA_KEY").is_ok()
}
}))
}