mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Improving custom widget API. Changing destroy function signature.
Summary: Destroy function in TableOperations was throwing error when invoked with a single record id instead of an array. Now it returns a void type. Also changing mapColumns function signature as it doesn't require options for a default behavior. Test Plan: Updated tests. Reviewers: alexmojaki Reviewed By: alexmojaki Differential Revision: https://phab.getgrist.com/D3404
This commit is contained in:
@@ -298,7 +298,8 @@ export class DocWorkerApi {
|
||||
this._app.post('/api/docs/:docId/tables/:tableId/data/delete', canEdit, withDoc(async (activeDoc, req, res) => {
|
||||
const rowIds = req.body;
|
||||
const op = getTableOperations(req, activeDoc);
|
||||
res.json(await op.destroy(rowIds));
|
||||
await op.destroy(rowIds);
|
||||
res.json(null);
|
||||
}));
|
||||
|
||||
// Download full document
|
||||
|
||||
Reference in New Issue
Block a user