import ShowQueueService from "./ShowQueueService"; import UserQueue from "../../models/UserQueue"; const DeleteQueueService = async (queueId: number | string): Promise => { const queue = await ShowQueueService(queueId); try { await UserQueue.destroy({ where: {queueId: queueId } }); } catch (error) { console.log('Error on delete UserQueue by queueId: ',queueId) } await queue.destroy(); }; export default DeleteQueueService;