diff --git a/server/src/notifikace.ts b/server/src/notifikace.ts index ffbb251..ee07e1d 100644 --- a/server/src/notifikace.ts +++ b/server/src/notifikace.ts @@ -73,12 +73,12 @@ export const ntfyCall = async (data: NotififaceInput) => { const today = formatDate(getToday()); let clientData: ClientData = await storage.getData(today); const userByCLocation = getUsersByLocation(clientData.choices, data.user) - // Odstraníme mezery a diakritiku a převedeme na lowercase - const topic = data.user.normalize('NFD').replace(' ', '').replace(/[\u0300-\u036f]/g, '').toLowerCase(); const token = Buffer.from(`${username}:${password}`, 'utf8').toString('base64'); const promises = userByCLocation.map(async user => { try { + // Odstraníme mezery a diakritiku a převedeme na lowercase + const topic = user.normalize('NFD').replace(' ', '').replace(/[\u0300-\u036f]/g, '').toLowerCase(); const response = await axios({ url: `${url}/${topic}`, method: 'POST',