ew/src/router/debug.rs
2024-10-18 22:27:47 -05:00

13 lines
317 B
Rust

use json::{JsonValue, object};
use actix_web::{HttpRequest};
use crate::encryption;
pub fn error(_req: HttpRequest, body: String) -> Option<JsonValue> {
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
println!("client error: {}", body["code"]);
Some(object!{})
}