learning food (I burnty my food for htis)

This commit is contained in:
LinlyBoi
2022-12-26 21:51:22 +02:00
parent f41ea8e67c
commit b766ef2ee4

View File

@@ -21,6 +21,7 @@ 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", "*"))
.json(fetched_ticket_data)
}
#[post("api/json/ticket/new")]