backend: route save / restore

This commit is contained in:
muerwre 2018-11-30 13:49:03 +07:00
parent 032821329b
commit d932fcb287
17 changed files with 163 additions and 43 deletions

View file

@ -229,7 +229,9 @@ export class Editor {
this.setTitle(title || '');
const { id } = this.getUser();
if (address && id && owner && id === owner) this.setAddress(address);
if (address && id && owner && id === owner.id) {
this.setAddress(address);
}
if (route) this.poly.setPoints(route);
@ -274,7 +276,7 @@ export class Editor {
this.setInitialData();
const url = (this.owner && this.owner === id) ? path : random_url;
const url = (this.owner && this.owner.id === id) ? path : random_url;
pushPath(`/${url}/edit`);