MCPcopy
hub / github.com/FlowiseAI/Flowise / updateDatasetRow

Function updateDatasetRow

packages/server/src/controllers/dataset/index.ts:129–150  ·  view source on GitHub ↗
(req: Request, res: Response, next: NextFunction)

Source from the content-addressed store, hash-verified

127}
128
129const updateDatasetRow = async (req: Request, res: Response, next: NextFunction) => {
130 try {
131 if (!req.body) {
132 throw new InternalFlowiseError(StatusCodes.PRECONDITION_FAILED, `Error: datasetService.updateDatasetRow - body not provided!`)
133 }
134 if (typeof req.params === 'undefined' || !req.params.id) {
135 throw new InternalFlowiseError(StatusCodes.PRECONDITION_FAILED, `Error: datasetService.updateDatasetRow - id not provided!`)
136 }
137 const workspaceId = req.user?.activeWorkspaceId
138 if (!workspaceId) {
139 throw new InternalFlowiseError(
140 StatusCodes.NOT_FOUND,
141 `Error: datasetController.updateDatasetRow - workspace ${workspaceId} not found!`
142 )
143 }
144 const body = { ...stripProtectedFields(req.body), workspaceId }
145 const apiResponse = await datasetService.updateDatasetRow(req.params.id, body)
146 return res.json(apiResponse)
147 } catch (error) {
148 next(error)
149 }
150}
151
152const deleteDatasetRow = async (req: Request, res: Response, next: NextFunction) => {
153 try {

Callers

nothing calls this directly

Calls 1

stripProtectedFieldsFunction · 0.90

Tested by

no test coverage detected