MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / getAllDatasets

Function getAllDatasets

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

Source from the content-addressed store, hash-verified

6import { stripProtectedFields } from '../../utils/stripProtectedFields'
7
8const getAllDatasets = async (req: Request, res: Response, next: NextFunction) => {
9 try {
10 const { page, limit } = getPageAndLimitParams(req)
11 const workspaceId = req.user?.activeWorkspaceId
12 if (!workspaceId) {
13 throw new InternalFlowiseError(
14 StatusCodes.NOT_FOUND,
15 `Error: datasetController.getAllDatasets - workspace ${workspaceId} not found!`
16 )
17 }
18 const apiResponse = await datasetService.getAllDatasets(workspaceId, page, limit)
19 return res.json(apiResponse)
20 } catch (error) {
21 next(error)
22 }
23}
24
25const getDataset = async (req: Request, res: Response, next: NextFunction) => {
26 try {

Callers

nothing calls this directly

Calls 1

getPageAndLimitParamsFunction · 0.90

Tested by

no test coverage detected