Browse Source

fix(nocodb): ts compilation issue

Ramesh Mane 4 days ago
parent
commit
b42eaa82aa
  1. 14
      packages/nocodb/src/models/CustomUrl.ts
  2. 2
      packages/nocodb/src/models/View.ts
  3. 2
      packages/nocodb/src/services/views.service.ts

14
packages/nocodb/src/models/CustomUrl.ts

@ -15,7 +15,7 @@ export default class CustomUrl implements CustomUrlType {
} }
public static async get( public static async get(
_params: Pick<CustomUrl, 'id' | 'view_id' | 'custom_path'>, _params: Partial<Pick<CustomUrl, 'id' | 'view_id' | 'custom_path'>>,
_ncMeta = Noco.ncMeta, _ncMeta = Noco.ncMeta,
) { ) {
return {} as CustomUrl; return {} as CustomUrl;
@ -36,7 +36,9 @@ export default class CustomUrl implements CustomUrlType {
} }
public static async list( public static async list(
_params: Pick<CustomUrl, 'fk_workspace_id' | 'base_id' | 'fk_model_id'>, _params: Partial<
Pick<CustomUrl, 'fk_workspace_id' | 'base_id' | 'fk_model_id'>
>,
_ncMeta = Noco.ncMeta, _ncMeta = Noco.ncMeta,
) { ) {
return [] as CustomUrl[]; return [] as CustomUrl[];
@ -51,19 +53,21 @@ export default class CustomUrl implements CustomUrlType {
} }
public static async checkAvailability( public static async checkAvailability(
_params: Pick<CustomUrl, 'id' | 'custom_path'>, _params: Partial<Pick<CustomUrl, 'id' | 'custom_path'>>,
_ncMeta = Noco.ncMeta, _ncMeta = Noco.ncMeta,
) { ) {
return false; return false;
} }
static async delete( static async delete(
_customUrl: Pick<CustomUrl, 'id' | 'view_id'>, _customUrl: Partial<Pick<CustomUrl, 'id' | 'view_id'>>,
_ncMeta = Noco.ncMeta, _ncMeta = Noco.ncMeta,
): Promise<any> {} ): Promise<any> {}
static async bulkDelete( static async bulkDelete(
_params: Pick<CustomUrl, 'fk_workspace_id' | 'base_id' | 'fk_model_id'>, _params: Partial<
Pick<CustomUrl, 'fk_workspace_id' | 'base_id' | 'fk_model_id'>
>,
_ncMeta = Noco.ncMeta, _ncMeta = Noco.ncMeta,
): Promise<any> {} ): Promise<any> {}
} }

2
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); await View.clearSingleQueryCache(context, view.fk_model_id, [view], ncMeta);
if (view.fk_custom_url_id) { 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}`); logger.error(`Failed to delete custom urls of viewId: ${view.id}`);
}); });
} }

2
packages/nocodb/src/services/views.service.ts

@ -294,7 +294,7 @@ export class ViewsService {
: {}), : {}),
}); });
} else { } else {
await CustomUrl.delete({ id: view.fk_custom_url_id }); await CustomUrl.delete({ id: view.fk_custom_url_id as string });
customUrl = undefined; customUrl = undefined;
} }
} else { } else {

Loading…
Cancel
Save