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

Function getAllEvaluators

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

getPageAndLimitParamsFunction · 0.90

Tested by

no test coverage detected