Diff
src/endpoints.rs | 9 +++++++++
src/main.rs | 1 +
2 files changed, 9 insertions(+), 1 deletion(-)
@@ -1,7 +1,8 @@
use chrono::Utc;
use crate::secrets::*;
use crate::verification::*;
use crate::email::*;
use crate::whitelist::*;
use actix_web::{web, Responder, HttpResponse};
pub async fn index() -> impl Responder {
@@ -46,7 +47,13 @@
if (receipt.valid) {
return HttpResponse::Ok()
.content_type("text/html; charset=utf-8")
.body(HTML_ON_EMAIL_VERIFIED_1.to_string() + &receipt.minecraft_username + HTML_ON_EMAIL_VERIFIED_2);
.body(
HTML_ON_EMAIL_VERIFIED_1.to_string()
+ &receipt.minecraft_username
+ HTML_ON_EMAIL_VERIFIED_2
+ add_to_whitelist(&receipt.minecraft_username).await.unwrap().as_str()
+ HTML_ON_EMAIL_VERIFIED_3
);
} else {
return HttpResponse::Ok()
.content_type("text/html; charset=utf-8")
@@ -1,7 +1,8 @@
mod endpoints;
mod secrets;
mod verification;
mod email;
mod whitelist;
use actix_web::{web, App, HttpServer};