From f8889df90354660fbeb3160e4f1a4e6416bc9a40 Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 19 Oct 2023 08:40:25 +0200 Subject: [PATCH] remove(console.log): se quitan console.log que se utilizaron para dbuggear refs #5979 --- back/methods/chat/sendCheckingPresence.js | 9 --------- back/methods/url/getUrl.js | 2 -- back/models/chat.js | 8 -------- modules/claim/back/methods/claim/updateClaim.js | 3 --- 4 files changed, 22 deletions(-) diff --git a/back/methods/chat/sendCheckingPresence.js b/back/methods/chat/sendCheckingPresence.js index 0bae87a35..7bba96d59 100644 --- a/back/methods/chat/sendCheckingPresence.js +++ b/back/methods/chat/sendCheckingPresence.js @@ -25,16 +25,10 @@ module.exports = Self => { }); Self.sendCheckingPresence = async(ctx, recipientId, message) => { - console.log('recipientId: ', recipientId); if (!recipientId) return false; const models = Self.app.models; - console.log('sender: ', ctx.req.accessToken.userId); const sender = ctx.req.accessToken.userId; - console.log('sender: ', sender); const recipient = recipientId; - console.log('recipient: ', recipient); - - console.log('recipientId == sender: ', recipientId == sender); // Prevent sending messages to yourself if (recipientId == sender) return false; @@ -42,7 +36,6 @@ module.exports = Self => { throw new Error(`Could not send message "${message}" to worker id ${recipientId} from user ${sender}`); if (process.env.NODE_ENV == 'test') message = `[Test:Environment to user ${sender}] ` + message; - console.log('chat create'); const chat = await models.Chat.create({ senderFk: sender.id, recipient: `@${recipient.name}`, @@ -53,8 +46,6 @@ module.exports = Self => { attempts: 0 }); - console.log('chat: '); - try { await Self.sendCheckingUserStatus(chat); await Self.updateChat(chat, 'sent'); diff --git a/back/methods/url/getUrl.js b/back/methods/url/getUrl.js index f258503b1..f30719b9f 100644 --- a/back/methods/url/getUrl.js +++ b/back/methods/url/getUrl.js @@ -19,14 +19,12 @@ module.exports = Self => { } }); Self.getUrl = async(appName = 'salix') => { - console.log('appName: ', appName); const {url} = await Self.app.models.Url.findOne({ where: { appName, enviroment: process.env.NODE_ENV || 'development' } }); - console.log('url: ', url); return url; }; }; diff --git a/back/models/chat.js b/back/models/chat.js index 240ec2c26..882db747e 100644 --- a/back/models/chat.js +++ b/back/models/chat.js @@ -6,26 +6,18 @@ module.exports = Self => { require('../methods/chat/sendQueued')(Self); Self.observe('before save', async function(ctx) { - console.log('chat start 1'); - - console.log('ctx.isNewInstance: ', ctx.isNewInstance); - console.log('message: ', ctx.instance); if (!ctx.isNewInstance) return; - let {message} = ctx.instance; if (!message) return; const parts = message.match(/(?<=\[)[a-zA-Z0-9_\-+!@#$%^&*()={};':"\\|,.<>/?\s]*(?=])/g); if (!parts) return; - console.log('chat start 2'); const replacedParts = parts.map(part => { return part.replace(/[!$%^&*()={};':"\\,.<>/?]/g, ''); }); - console.log('chat start 3'); for (const [index, part] of parts.entries()) message = message.replace(part, replacedParts[index]); ctx.instance.message = message; - console.log('chat end'); }); }; diff --git a/modules/claim/back/methods/claim/updateClaim.js b/modules/claim/back/methods/claim/updateClaim.js index e418af950..8210f7a83 100644 --- a/modules/claim/back/methods/claim/updateClaim.js +++ b/modules/claim/back/methods/claim/updateClaim.js @@ -136,9 +136,6 @@ module.exports = Self => { clientName: claim.client().name, claimUrl: `${url}claim/${claim.id}/summary` }); - console.log('url', `${url}claim/${claim.id}/summary`); - console.log('claim client', claim.client().name); - console.log('claim id', claim.id); await models.Chat.sendCheckingPresence(ctx, workerId, message); } };