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

2
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 {

Loading…
Cancel
Save