mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 11:49:19 +00:00
feat: add queue and assoc with whatsapps
This commit is contained in:
@@ -11,6 +11,7 @@ import UpdateWhatsAppService from "../services/WhatsappService/UpdateWhatsAppSer
|
||||
|
||||
interface WhatsappData {
|
||||
name: string;
|
||||
queueIds: number[];
|
||||
status?: string;
|
||||
isDefault?: boolean;
|
||||
}
|
||||
@@ -22,15 +23,16 @@ export const index = async (req: Request, res: Response): Promise<Response> => {
|
||||
};
|
||||
|
||||
export const store = async (req: Request, res: Response): Promise<Response> => {
|
||||
const { name, status, isDefault }: WhatsappData = req.body;
|
||||
const { name, status, isDefault, queueIds }: WhatsappData = req.body;
|
||||
|
||||
const { whatsapp, oldDefaultWhatsapp } = await CreateWhatsAppService({
|
||||
name,
|
||||
status,
|
||||
isDefault
|
||||
isDefault,
|
||||
queueIds
|
||||
});
|
||||
|
||||
StartWhatsAppSession(whatsapp);
|
||||
// StartWhatsAppSession(whatsapp);
|
||||
|
||||
const io = getIO();
|
||||
io.emit("whatsapp", {
|
||||
|
||||
Reference in New Issue
Block a user