From 5888af4331965faf1881c4911a2087cd95a02647 Mon Sep 17 00:00:00 2001 From: garrettmills Date: Tue, 16 Mar 2021 23:30:43 -0500 Subject: [PATCH] Make sharing public links generate site viewer links --- src/app/components/sharing/selector/selector.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/sharing/selector/selector.component.ts b/src/app/components/sharing/selector/selector.component.ts index ed05974..a8c5526 100644 --- a/src/app/components/sharing/selector/selector.component.ts +++ b/src/app/components/sharing/selector/selector.component.ts @@ -72,9 +72,9 @@ export class SelectorComponent implements OnInit { } getShareLink(level) { - this.api.get(`/share/page/${this.node.id}/link/${level}?public=${this.publicLink}`).subscribe(result => { + this.api.get(`/share/page/${this.node.id}/link/${level}${this.publicLink ? '?public=true' : ''}`).subscribe(result => { if ( this.publicLink ) { - this.generatedLink = `${window.location.origin}${environment.appBase}editor;id=${this.node.id}`; + this.generatedLink = `${window.location.origin}${environment.appBase}editor/site;id=${this.node.id}`; this.ngOnInit(); } else { this.generatedLink = result.data.link;