2022-01-06 01:26:15 +00:00
|
|
|
import Ticket from "../models/Ticket";
|
2022-10-25 14:16:36 +00:00
|
|
|
import UpdateTicketService from "../services/TicketServices/UpdateTicketService";
|
2022-01-06 01:26:15 +00:00
|
|
|
|
|
|
|
const UpdateDeletedUserOpenTicketsStatus = async (
|
|
|
|
tickets: Ticket[]
|
|
|
|
): Promise<void> => {
|
|
|
|
tickets.forEach(async t => {
|
2022-10-25 14:16:36 +00:00
|
|
|
|
|
|
|
const ticketId = t.id.toString();
|
|
|
|
|
|
|
|
await UpdateTicketService({ ticketData: { status: "pending" }, ticketId });
|
|
|
|
|
2022-01-06 01:26:15 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
export default UpdateDeletedUserOpenTicketsStatus;
|