This commit is contained in:
LinlyBoi
2022-12-26 22:56:57 +02:00
parent b766ef2ee4
commit 7a1e385802

View File

@@ -20,8 +20,8 @@ use common::{CommonAdmin, CommonDriver, CommonTicket};
async fn api_json_ticket(id: web::Path<i32>) -> impl Responder {
let fetched_ticket_data = get_ticket(&mut establish_connection(), *id);
HttpResponse::Ok()
.content_type(ContentType::json())
.insert_header(("Access-Control-Allow-Origin", "*"))
.insert_header(("content_type", "application/json"))
.json(fetched_ticket_data)
}
#[post("api/json/ticket/new")]