Skip to content

Commit

Permalink
Fix emailID case sensitivity issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hppanpaliya committed Jan 22, 2024
1 parent 417b248 commit ca9fcea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mailserver/emailRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const { ObjectId } = require("mongodb");
const path = require("path");
const fs = require("fs");
const {deleteEmailAndAttachments} = require("./emailHandler");
const e = require("express");

const router = express.Router();

Expand Down Expand Up @@ -139,7 +140,8 @@ router.get("/email/:emailID/:email_id", async (req, res) => {
// Delete email data and attachments for emailId with specific mongodb id (email_id)
router.delete("/email/:emailID/:email_id", async (req, res) => {
try {
const { email_id, emailID } = req.params;
let { email_id, emailID } = req.params;
emailID = emailID.toLowerCase();
console.log("email_id", email_id);

const deletedCount = await deleteEmailAndAttachments(emailID, email_id);
Expand Down

0 comments on commit ca9fcea

Please sign in to comment.