Skip to content

Commit

Permalink
Correção no ID na ativação do Channel
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed Oct 16, 2024
1 parent 68d9c80 commit b90fa7e
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions backend/src/services/HubServices/CreateHubChannelsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const CreateChannelsService = async ({
channels = channels.map(channel => {
return {
...channel,
id: undefined,
type: channel.channel,
qrcode: channel.id,
status: "CONNECTED"
Expand All @@ -23,17 +24,6 @@ const CreateChannelsService = async ({

const whatsapps = await Whatsapp.bulkCreate(channels);

// for(const whatsapp of whatsapps){
// const connection = await Whatsapp.findOne({
// where: { qrcode: whatsapp.id }
// });
// const io = getIO();
// io.emit("whatsapp", {
// action: "update",
// connection
// });
// }

return { whatsapps };
};

Expand Down

0 comments on commit b90fa7e

Please sign in to comment.