projeto-hit/backend/src/helpers/UpdateDeletedUserOpenTicket...

18 lines
442 B
TypeScript
Raw Normal View History

import Ticket from "../models/Ticket";
import UpdateTicketService from "../services/TicketServices/UpdateTicketService";
const UpdateDeletedUserOpenTicketsStatus = async (
tickets: Ticket[]
): Promise<void> => {
tickets.forEach(async t => {
const ticketId = t.id.toString();
await UpdateTicketService({
ticketData: { status: "pending" },
ticketId
});
});
};
export default UpdateDeletedUserOpenTicketsStatus;