mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) remove deprecated /download endpoint in favor of newer /api/docs/NNNN/download
Summary: This endpoint has started to fail when called between a pair of doc workers. The simplest fix is to simply remove it, it serves no purpose. Test Plan: added basic deployment test Reviewers: dsagal Reviewed By: dsagal Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D3636
This commit is contained in:
@@ -417,7 +417,7 @@ async function fetchDoc(server: GristServer, docId: string, req: Request, access
|
||||
await _checkForError(response);
|
||||
const docWorkerUrl = getDocWorkerUrl(server.getOwnUrl(), await response.json());
|
||||
// Download the document, in full or as a template.
|
||||
const url = new URL(`download?doc=${docId}&template=${Number(template)}`,
|
||||
const url = new URL(`api/docs/${docId}/download?template=${Number(template)}`,
|
||||
docWorkerUrl.replace(/\/*$/, '/'));
|
||||
return _fetchURL(url.href, accessId, {headers});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user