From 7e86c2dc5bd2e934097123ec89da07086539d2ba Mon Sep 17 00:00:00 2001 From: Munkh-Orgil Date: Wed, 8 Apr 2020 22:17:12 +0800 Subject: [PATCH] fix: add userId in upload-file and mail-attachment --- src/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index ce3b51ac9..748788af0 100755 --- a/src/index.ts +++ b/src/index.ts @@ -198,7 +198,7 @@ app.get('/read-mail-attachment', async (req: any, res) => { const integrationPath = kind.includes('nylas') ? 'nylas' : kind; res.redirect( - `${INTEGRATIONS_API_DOMAIN}/${integrationPath}/get-attachment?messageId=${messageId}&attachmentId=${attachmentId}&integrationId=${integrationId}&filename=${filename}&contentType=${contentType}&=userId${req.user._id}`, + `${INTEGRATIONS_API_DOMAIN}/${integrationPath}/get-attachment?messageId=${messageId}&attachmentId=${attachmentId}&integrationId=${integrationId}&filename=${filename}&contentType=${contentType}&userId=${req.user._id}`, ); }); @@ -223,8 +223,6 @@ app.post('/upload-file', async (req: any, res, next) => { if (req.query.kind === 'nylas') { debugExternalApi(`Pipeing request to ${INTEGRATIONS_API_DOMAIN}`); - req.headers.userId = req.user_id; - return req.pipe( request .post(`${INTEGRATIONS_API_DOMAIN}/nylas/upload`)