mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Treating API urls as external in cells
Summary: Links for the API endpoints in a cell didn't work as they were interpreted as internal routes. Now they are properly detected as external. Test Plan: Added new test Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D4078
This commit is contained in:
@@ -1547,9 +1547,9 @@ export class FlexServer implements GristServer {
|
||||
state.slug = getSlugIfNeeded(resource);
|
||||
}
|
||||
state.org = this._dbManager.normalizeOrgDomain(org.id, org.domain, org.ownerId);
|
||||
state.api = purpose === 'api';
|
||||
if (!gristConfig.homeUrl) { throw new Error('Computing a resource URL requires a home URL'); }
|
||||
return encodeUrl(gristConfig, state, new URL(gristConfig.homeUrl),
|
||||
{ api: purpose === 'api' });
|
||||
return encodeUrl(gristConfig, state, new URL(gristConfig.homeUrl));
|
||||
}
|
||||
|
||||
public addUsage() {
|
||||
|
||||
Reference in New Issue
Block a user