Skip to content

Commit

Permalink
Remove id from TICKET_UPDATED message.
Browse files Browse the repository at this point in the history
  • Loading branch information
raychz committed Feb 2, 2020
1 parent 2589d85 commit a636f7a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/services/ticket.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ export class TicketService {
*/
async createTicket(ticket: TicketEntity, opened_recently: boolean, relations: string[]) {

const where: FindConditions<TicketEntity> = { location: ticket.location, tab_id: ticket.tab_id,
ticket_number: ticket.ticket_number, ticket_status: TicketStatus.OPEN };
const where: FindConditions<TicketEntity> = {
location: ticket.location, tab_id: ticket.tab_id,
ticket_number: ticket.ticket_number, ticket_status: TicketStatus.OPEN,
};

// see if a ticket was created in the last 6 hours
if (opened_recently) {
Expand Down Expand Up @@ -154,7 +156,7 @@ export class TicketService {

await this.serverService.sendTicketCloseSMSToServer(ticketId);

await this.ablyService.publish(TicketUpdates.TICKET_UPDATED, {id: ticketId, ticket_status: TicketStatus.CLOSED}, ticketId.toString());
await this.ablyService.publish(TicketUpdates.TICKET_UPDATED, { ticket_status: TicketStatus.CLOSED }, ticketId.toString());

return res;
}
Expand Down

0 comments on commit a636f7a

Please sign in to comment.