示例#1
0
def create_ticket():
    """Create a new ticket."""
    ticket_data = request.get_json()
    new_ticket = TicketController.create_ticket(ticket_data)
    return jsonify(new_ticket.conv_ticket_to_dict())
示例#2
0
def create_ticket():
    """Create a new ticket and add it to the ticket pool."""
    data = request.get_json()
    ticket = TicketController.create_ticket(data)
    return jsonify(ticket.ticket_to_dict())