mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Adding DELETE /api/docs/webhooks/queue endpoint to clear the queue
Summary: Creating an API endpoint to cancel any queued webhook messages from a document. Test Plan: Updated Reviewers: paulfitz, georgegevoian Reviewed By: paulfitz, georgegevoian Differential Revision: https://phab.getgrist.com/D3713
This commit is contained in:
@@ -618,6 +618,14 @@ export class DocWorkerApi {
|
||||
})
|
||||
);
|
||||
|
||||
// Clears all outgoing webhooks in the queue for this document.
|
||||
this._app.delete('/api/docs/:docId/webhooks/queue', isOwner,
|
||||
withDoc(async (activeDoc, req, res) => {
|
||||
await activeDoc.clearWebhookQueue();
|
||||
res.json({success: true});
|
||||
})
|
||||
);
|
||||
|
||||
// Reload a document forcibly (in fact this closes the doc, it will be automatically
|
||||
// reopened on use).
|
||||
this._app.post('/api/docs/:docId/force-reload', canEdit, throttled(async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user