Make sharing public links generate site viewer links
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Garrett Mills 2021-03-16 23:30:43 -05:00
parent 4a1df4ee6a
commit 5888af4331
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

View File

@ -72,9 +72,9 @@ export class SelectorComponent implements OnInit {
} }
getShareLink(level) { 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 ) { 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(); this.ngOnInit();
} else { } else {
this.generatedLink = result.data.link; this.generatedLink = result.data.link;