{{ $t('activity.restrictAccessWithPassword') }}
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json
index 3d700d172f..6343d26cf0 100644
--- a/packages/nc-gui/lang/en.json
+++ b/packages/nc-gui/lang/en.json
@@ -630,6 +630,7 @@
"categories": "Categories",
"fieldInaccessible": "Field inaccessible",
"noConditionsAdded": "No conditions added",
+ "thisCustomUrlIsAlreadyUsed": "This custom URL is already in use.",
"noAiIntegrationAvailable": "No AI Integrations available.",
"nocoAiBaseBuilder": "Noco AI Base Builder",
"additionalDetails": "Additional Details",
diff --git a/packages/nocodb/src/models/CustomUrl.ts b/packages/nocodb/src/models/CustomUrl.ts
index 6eb9117139..0e053a14e2 100644
--- a/packages/nocodb/src/models/CustomUrl.ts
+++ b/packages/nocodb/src/models/CustomUrl.ts
@@ -1,6 +1,7 @@
+import { CustomUrlType } from 'nocodb-sdk';
import Noco from '~/Noco';
-export default class CustomUrl {
+export default class CustomUrl implements CustomUrlType {
id?: string;
fk_workspace_id?: string;
base_id?: string;
diff --git a/packages/nocodb/src/models/View.ts b/packages/nocodb/src/models/View.ts
index a94d39db58..f64399ac09 100644
--- a/packages/nocodb/src/models/View.ts
+++ b/packages/nocodb/src/models/View.ts
@@ -130,14 +130,6 @@ export default class View implements ViewType {
if (view) {
view.meta = parseMetaProp(view);
- if (view.fk_custom_url_id) {
- const customUrl = await CustomUrl.get({
- id: view.fk_custom_url_id,
- });
-
- view.custom_url_path = customUrl.custom_path || null;
- }
-
await NocoCache.set(`${CacheScope.VIEW}:${view.id}`, view);
}
}
@@ -180,14 +172,6 @@ export default class View implements ViewType {
);
if (view) {
- if (view.fk_custom_url_id) {
- const customUrl = await CustomUrl.get({
- id: view.fk_custom_url_id,
- });
-
- view.custom_url_path = customUrl.custom_path || null;
- }
-
await NocoCache.set(
`${CacheScope.VIEW}:${fk_model_id}:${view.id}`,
view,
@@ -228,13 +212,6 @@ export default class View implements ViewType {
);
if (view) {
view.meta = parseMetaProp(view);
- if (view.fk_custom_url_id) {
- const customUrl = await CustomUrl.get({
- id: view.fk_custom_url_id,
- });
-
- view.custom_url_path = customUrl.custom_path || null;
- }
await NocoCache.set(`${CacheScope.VIEW}:${fk_model_id}:default`, view);
}
@@ -266,14 +243,6 @@ export default class View implements ViewType {
);
for (const view of viewsList) {
view.meta = parseMetaProp(view);
-
- if (view.fk_custom_url_id) {
- const customUrl = await CustomUrl.get({
- id: view.fk_custom_url_id,
- });
-
- view.custom_url_path = customUrl.custom_path || null;
- }
}
await NocoCache.setList(CacheScope.VIEW, [modelId], viewsList);
}
diff --git a/packages/nocodb/src/schema/swagger-v2.json b/packages/nocodb/src/schema/swagger-v2.json
index c4f943010e..6db88eb21c 100644
--- a/packages/nocodb/src/schema/swagger-v2.json
+++ b/packages/nocodb/src/schema/swagger-v2.json
@@ -22132,6 +22132,40 @@
}
},
"type": "object"
+ },
+ "CustomUrl": {
+ "description": "Model for Custom Url",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Id associated to the Custom url"
+ },
+ "fk_workspace_id": {
+ "type": "string",
+ "description": "Workspace ID"
+ },
+ "base_id": {
+ "type": "string",
+ "description": "Base ID"
+ },
+ "fk_model_id": {
+ "type": "string",
+ "description": "Model ID"
+ },
+ "view_id": {
+ "type": "string",
+ "description": "View ID"
+ },
+ "original_path": {
+ "type": "string",
+ "description": "Original url used for redirection purpose"
+ },
+ "custom_path": {
+ "type": "string",
+ "description": "Custom url path"
+ }
+ }
}
},
"responses": {