(core) make SELF_HYPERLINK urls cleaner

Summary:
This cleans up a few things about SELF_HYPERLINK urls:

 * Use `urlId` rather than `docId`.
 * Correctly merge personal org subdomain.
 * In dev environment, use clearer port number.

Test Plan: updated test

Reviewers: alexmojaki, dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2841
This commit is contained in:
Paul Fitzpatrick
2021-05-27 16:08:18 -04:00
parent 37698f9cb5
commit c6265335af
3 changed files with 26 additions and 11 deletions

View File

@@ -1147,7 +1147,7 @@ export class FlexServer implements GristServer {
state.ws = resource.id;
} else {
org = resource.workspace.org;
state.doc = resource.id;
state.doc = resource.urlId || resource.id;
state.slug = getSlugIfNeeded(resource);
}
state.org = this.dbManager.normalizeOrgDomain(org.id, org.domain, org.ownerId);