From 781796d655303bbecedf5ead8d90059f5d37ed0e Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 26 Nov 2024 05:46:55 +0000 Subject: [PATCH] fix(nocodb): ts compilation issue --- packages/nocodb/src/models/CustomUrl.ts | 14 +++++++++----- packages/nocodb/src/models/View.ts | 2 +- packages/nocodb/src/services/views.service.ts | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/nocodb/src/models/CustomUrl.ts b/packages/nocodb/src/models/CustomUrl.ts index aa71feb996..fee4a8847d 100644 --- a/packages/nocodb/src/models/CustomUrl.ts +++ b/packages/nocodb/src/models/CustomUrl.ts @@ -15,7 +15,7 @@ export default class CustomUrl implements CustomUrlType { } public static async get( - _params: Pick, + _params: Partial>, _ncMeta = Noco.ncMeta, ) { return {} as CustomUrl; @@ -36,7 +36,9 @@ export default class CustomUrl implements CustomUrlType { } public static async list( - _params: Pick, + _params: Partial< + Pick + >, _ncMeta = Noco.ncMeta, ) { return [] as CustomUrl[]; @@ -51,19 +53,21 @@ export default class CustomUrl implements CustomUrlType { } public static async checkAvailability( - _params: Pick, + _params: Partial>, _ncMeta = Noco.ncMeta, ) { return false; } static async delete( - _customUrl: Pick, + _customUrl: Partial>, _ncMeta = Noco.ncMeta, ): Promise {} static async bulkDelete( - _params: Pick, + _params: Partial< + Pick + >, _ncMeta = Noco.ncMeta, ): Promise {} } diff --git a/packages/nocodb/src/models/View.ts b/packages/nocodb/src/models/View.ts index d8e9064429..e8f999c1be 100644 --- a/packages/nocodb/src/models/View.ts +++ b/packages/nocodb/src/models/View.ts @@ -1419,7 +1419,7 @@ export default class View implements ViewType { await View.clearSingleQueryCache(context, view.fk_model_id, [view], ncMeta); if (view.fk_custom_url_id) { - CustomUrl.delete({ id: view.fk_custom_url_id }).catch(() => { + CustomUrl.delete({ id: view.fk_custom_url_id as string }).catch(() => { logger.error(`Failed to delete custom urls of viewId: ${view.id}`); }); } diff --git a/packages/nocodb/src/services/views.service.ts b/packages/nocodb/src/services/views.service.ts index e9dca8e524..92e4157dd1 100644 --- a/packages/nocodb/src/services/views.service.ts +++ b/packages/nocodb/src/services/views.service.ts @@ -294,7 +294,7 @@ export class ViewsService { : {}), }); } else { - await CustomUrl.delete({ id: view.fk_custom_url_id }); + await CustomUrl.delete({ id: view.fk_custom_url_id as string }); customUrl = undefined; } } else {