Implement notice endpoint

This commit is contained in:
Ethan O'Brien
2024-02-26 20:41:26 -06:00
parent 05bf6c011e
commit 0ec158b889
3 changed files with 22 additions and 0 deletions

View File

@@ -75,6 +75,9 @@ async fn lottery_tutorial(req: HttpRequest, body: String) -> HttpResponse { rout
#[post("/api/lottery")]
async fn lottery(req: HttpRequest, body: String) -> HttpResponse { router::lottery::lottery(req, body) }
#[get("/api/notice/reward")]
async fn reward(req: HttpRequest) -> HttpResponse { router::notice::reward(req) }
async fn log_unknown_request(req: HttpRequest, body: String) -> HttpResponse {
if body != String::new() {
println!("{}", encryption::decrypt_packet(&body).unwrap());
@@ -92,6 +95,7 @@ async fn main() -> std::io::Result<()> {
println!("Request: {}", req.path());
srv.call(req)
})
.service(reward)
.service(live_guest)
.service(live_clearrate)
.service(live_start)