import StatusChatEnd from "../../models/StatusChatEnd"; import AppError from "../../errors/AppError"; const ShowStatusChatEndService = async ( id: string | number ): Promise => { const status = await StatusChatEnd.findByPk(id, { attributes: ["id", "name"] }); console.log(`---------------> statusChatEnd id: ${id}`); if (!status) { throw new AppError("ERR_NO_STATUS_FOUND", 404); } return status; }; export default ShowStatusChatEndService;