mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2025-10-09 00:47:19 +08:00
Implement notice endpoint
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user