From 8517a0cc83c14b129322e1e04a904638cdccacc6 Mon Sep 17 00:00:00 2001 From: mertmit Date: Wed, 4 Oct 2023 14:57:19 +0000 Subject: [PATCH] fix: PR requested things --- packages/nocodb/src/cache/RedisCacheMgr.ts | 2 +- packages/nocodb/src/cache/RedisMockCacheMgr.ts | 2 +- packages/nocodb/src/plugins/s3/S3.ts | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/nocodb/src/cache/RedisCacheMgr.ts b/packages/nocodb/src/cache/RedisCacheMgr.ts index 53b1de6a88..531b5da185 100644 --- a/packages/nocodb/src/cache/RedisCacheMgr.ts +++ b/packages/nocodb/src/cache/RedisCacheMgr.ts @@ -98,7 +98,7 @@ export default class RedisCacheMgr extends CacheMgr { async setExpiring(key: string, value: any, seconds: number): Promise { if (typeof value !== 'undefined' && value) { log( - `RedisCacheMgr::set: setting key ${key} with value ${value} for ${seconds} seconds`, + `RedisCacheMgr::setExpiring: setting key ${key} with value ${value} for ${seconds} seconds`, ); if (typeof value === 'object') { if (Array.isArray(value) && value.length) { diff --git a/packages/nocodb/src/cache/RedisMockCacheMgr.ts b/packages/nocodb/src/cache/RedisMockCacheMgr.ts index edb721f6b5..004a578722 100644 --- a/packages/nocodb/src/cache/RedisMockCacheMgr.ts +++ b/packages/nocodb/src/cache/RedisMockCacheMgr.ts @@ -93,7 +93,7 @@ export default class RedisMockCacheMgr extends CacheMgr { async setExpiring(key: string, value: any, seconds: number): Promise { if (typeof value !== 'undefined' && value) { log( - `RedisMockCacheMgr::set: setting key ${key} with value ${value} for ${seconds} seconds`, + `RedisMockCacheMgr::setExpiring: setting key ${key} with value ${value} for ${seconds} seconds`, ); // TODO: better way to handle expiration in mock redis diff --git a/packages/nocodb/src/plugins/s3/S3.ts b/packages/nocodb/src/plugins/s3/S3.ts index 53f29ec20b..0e6bac01a0 100644 --- a/packages/nocodb/src/plugins/s3/S3.ts +++ b/packages/nocodb/src/plugins/s3/S3.ts @@ -106,12 +106,14 @@ export default class S3 implements IStorageAdapterV2 { }); } - public async getSignedUrl(key, expires = 7200) { + public async getSignedUrl(key, expiresInSeconds = 7200) { const command = new GetObjectCommand({ Key: key, Bucket: this.input.bucket, }); - return getSignedUrl(this.s3Client, command, { expiresIn: expires }); + return getSignedUrl(this.s3Client, command, { + expiresIn: expiresInSeconds, + }); } public async init(): Promise {