From 6cce3bcd41064778964dfb52d43085384f5356b1 Mon Sep 17 00:00:00 2001 From: thanhdanh27600 Date: Sat, 6 Apr 2024 10:02:13 +0700 Subject: [PATCH] minor change --- public/locales/vi/common.json | 2 +- src/controllers/forward.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/locales/vi/common.json b/public/locales/vi/common.json index 7c5ca2c8..e44b0e79 100644 --- a/public/locales/vi/common.json +++ b/public/locales/vi/common.json @@ -127,5 +127,5 @@ "otherCountry": "Khác", "file": "File", "uploadFile": "Upload file", - "donateDetail": "Duy trì server 100k/ngày, ai đó gánh chung không 🙏" + "donateDetail": "Duy trì server 50k/ngày, ai đó gánh chung không 🙏" } diff --git a/src/controllers/forward.ts b/src/controllers/forward.ts index 1f49e445..39267b43 100644 --- a/src/controllers/forward.ts +++ b/src/controllers/forward.ts @@ -51,9 +51,9 @@ export const handler = api( const hashKey = getRedisKey(REDIS_KEY.MAP_SHORTEN_BY_HASH, hash); const shortenedUrlCache = (await redis.hgetall(hashKey)) as any; if (!isEmpty(shortenedUrlCache)) { + // cache hit valid = shortenService.verifyToken(shortenedUrlCache, token); if (!valid) return res.send({ errorCode: HttpStatusCode.UNAUTHORIZED, errorMessage: 'UNAUTHORIZED' }); - // cache hit sendMessageToQueue([{ subject: 'forward', body: data }]); return successHandler(res, { history: shortenedUrlCache, token: encryptS(shortenedUrlCache.id.toString()) }); }