YESS
This commit is contained in:
@@ -44,6 +44,7 @@ pub struct Ticket {
|
|||||||
#[derive(Insertable)]
|
#[derive(Insertable)]
|
||||||
#[diesel(table_name = tickets)]
|
#[diesel(table_name = tickets)]
|
||||||
pub struct NewTicket<'a> {
|
pub struct NewTicket<'a> {
|
||||||
|
pub id: i32,
|
||||||
pub category: &'a str,
|
pub category: &'a str,
|
||||||
pub description: &'a str,
|
pub description: &'a str,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ async fn api_json_ticket(id: web::Path<i32>) -> Json<CommonTicket> {
|
|||||||
async fn api_json_ticket_new(ticket: web::Json<CommonTicket>) -> impl Responder {
|
async fn api_json_ticket_new(ticket: web::Json<CommonTicket>) -> impl Responder {
|
||||||
let input = ticket.into_inner();
|
let input = ticket.into_inner();
|
||||||
let input_result = NewTicket {
|
let input_result = NewTicket {
|
||||||
|
id: input.id,
|
||||||
description: &input.description,
|
description: &input.description,
|
||||||
category: &input.category,
|
category: &input.category,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user