escape ***@*** in maskedEmail in discord log

This commit is contained in:
Ean Milligan
2026-04-09 01:47:53 -04:00
parent 2669120524
commit 5ec93890bc

2
mod.ts
View File

@@ -139,7 +139,7 @@ Deno.serve({ port: config.api.port }, async (req) => {
fetch(config.discordWebhook, { fetch(config.discordWebhook, {
method: 'POST', method: 'POST',
headers: discordHeaders, headers: discordHeaders,
body: JSON.stringify({ content: `Delete code email has been sent to ${maskedEmail}` }), body: JSON.stringify({ content: `Delete code email has been sent to \`${maskedEmail}\`.` }),
}).catch(() => {}); }).catch(() => {});
return genericResponse(STATUS_CODE.PreconditionFailed, `Please resubmit with the confirmation code emailed to "${maskedEmail}".`); return genericResponse(STATUS_CODE.PreconditionFailed, `Please resubmit with the confirmation code emailed to "${maskedEmail}".`);
} else if (hasEmail && body.deleteCode !== deleteCode) { } else if (hasEmail && body.deleteCode !== deleteCode) {