|
|
|
@ -278,7 +278,10 @@ export class ViewsService {
|
|
|
|
|
NcError.viewNotFound(param.viewId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let customUrl: CustomUrl | undefined = await CustomUrl.get({ |
|
|
|
|
let customUrl: CustomUrl | undefined; |
|
|
|
|
|
|
|
|
|
if (param.sharedView.custom_url_path !== undefined) { |
|
|
|
|
customUrl = await CustomUrl.get({ |
|
|
|
|
view_id: view.id, |
|
|
|
|
id: view.fk_custom_url_id, |
|
|
|
|
}); |
|
|
|
@ -297,7 +300,7 @@ export class ViewsService {
|
|
|
|
|
await CustomUrl.delete({ id: view.fk_custom_url_id as string }); |
|
|
|
|
customUrl = undefined; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
} else if (param.sharedView.custom_url_path) { |
|
|
|
|
customUrl = await CustomUrl.insert({ |
|
|
|
|
fk_workspace_id: view.fk_workspace_id, |
|
|
|
|
base_id: view.base_id, |
|
|
|
@ -307,6 +310,7 @@ export class ViewsService {
|
|
|
|
|
custom_path: param.sharedView.custom_url_path, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const result = await View.update(context, param.viewId, { |
|
|
|
|
...param.sharedView, |
|
|
|
|