(id: string, workspaceId: string, entityManager?: any)
| 302 | } |
| 303 | |
| 304 | const changeUpdateOnDataset = async (id: string, workspaceId: string, entityManager?: any) => { |
| 305 | const appServer = getRunningExpressApp() |
| 306 | const dataset = await appServer.AppDataSource.getRepository(Dataset).findOneBy({ |
| 307 | id: id, |
| 308 | workspaceId: workspaceId |
| 309 | }) |
| 310 | if (!dataset) throw new InternalFlowiseError(StatusCodes.NOT_FOUND, `Dataset ${id} not found`) |
| 311 | |
| 312 | dataset.updatedDate = new Date() |
| 313 | if (entityManager) { |
| 314 | await entityManager.getRepository(Dataset).save(dataset) |
| 315 | } else { |
| 316 | await appServer.AppDataSource.getRepository(Dataset).save(dataset) |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | // Update row for a dataset |
| 321 | const updateDatasetRow = async (id: string, body: any) => { |
no test coverage detected