|
|
@ -24,16 +24,11 @@ async function executeBulkOperation( |
|
|
|
id: model.id, |
|
|
|
id: model.id, |
|
|
|
viewId: view?.id, |
|
|
|
viewId: view?.id, |
|
|
|
dbDriver: NcConnectionMgrv2.get(base), |
|
|
|
dbDriver: NcConnectionMgrv2.get(base), |
|
|
|
}).catch((error) => { |
|
|
|
|
|
|
|
res.status(500).json(error); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
if (!baseModel) { |
|
|
|
if (!baseModel) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
const sqlResult = await baseModel[operation](...options).catch((error) => { |
|
|
|
res.json(await baseModel[operation](...options)); |
|
|
|
res.status(500).json(error); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
res.json(sqlResult); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async function bulkDataInsert(req: Request, res: Response) { |
|
|
|
async function bulkDataInsert(req: Request, res: Response) { |
|
|
|