Skip to content

Commit

Permalink
fix token
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhdanh27600 committed Oct 14, 2023
1 parent b21950d commit aacbb65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/controllers/forward.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ export const handler = api<Forward>(
valid = shortenService.verifyToken(history, token);
if (!valid) return res.send({ errorCode: HttpStatusCode.UNAUTHORIZED, errorMessage: 'UNAUTHORIZED' });

if (history?.email) history.email = '';
if (history?.password) history.password = '';

sendMessageToQueue([{ subject: 'forward', body: data }]);
shortenCacheService.postShortenHash(history);

if (history?.email) history.email = '';
if (history?.password) history.password = '';
return successHandler(res, { history, token: encryptS(history.id.toString()) });
},
['POST'],
Expand Down

0 comments on commit aacbb65

Please sign in to comment.