mum
This commit is contained in:
@@ -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<i32>) -> Json<CommonTicket> {
|
||||
async fn api_json_ticket(id: web::Path<i32>) -> 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<CommonTicket>) -> impl Responder {
|
||||
|
||||
Reference in New Issue
Block a user