yes
This commit is contained in:
@@ -22,7 +22,7 @@ async fn api_json_ticket(id: web::Path<i32>) -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
.content_type(ContentType::json())
|
||||
.insert_header(("Access-Control-Allow-Origin", "*"))
|
||||
.insert_header(("Access-Control-Allow-Methods", "GET"))
|
||||
.insert_header(("content-encoded", "gzip"))
|
||||
.insert_header((
|
||||
"Access-Control-Allow-Headers",
|
||||
"Content-Type, Content-Length, User-Agent, X-Requested-With, Range, DNT ",
|
||||
@@ -37,7 +37,7 @@ async fn api_json_ticket_new(ticket: web::Json<CommonTicket>) -> impl Responder
|
||||
description: &input.description,
|
||||
category: &input.category,
|
||||
};
|
||||
let result = create_ticket(&mut establish_connection(), input_result);
|
||||
create_ticket(&mut establish_connection(), input_result);
|
||||
HttpResponse::Ok()
|
||||
.content_type(ContentType::plaintext())
|
||||
.insert_header(("Access-Control-Allow-Origin", "*"))
|
||||
|
||||
Reference in New Issue
Block a user