diff --git a/src/shadowrealmapi.rs b/src/shadowrealmapi.rs index d644aa0..60f3b43 100644 --- a/src/shadowrealmapi.rs +++ b/src/shadowrealmapi.rs @@ -17,9 +17,11 @@ use common::{CommonAdmin, CommonDriver, CommonTicket}; // Json goodies? NAHH // Ticket Table Services #[get("api/json/ticket/{id}")] -async fn api_json_ticket(id: web::Path) -> Json { +async fn api_json_ticket(id: web::Path) -> impl Responder { let fetched_ticket_data = get_ticket(&mut establish_connection(), *id); - Json(fetched_ticket_data) + HttpResponse::Ok() + .content_type(ContentType::json()) + .json(fetched_ticket_data) } #[post("api/json/ticket/new")] async fn api_json_ticket_new(ticket: web::Json) -> impl Responder {