(req: Request, res: Response, next: NextFunction)
| 5 | import { getPageAndLimitParams } from '../../utils/pagination' |
| 6 | |
| 7 | const 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 | |
| 24 | const getEvaluator = async (req: Request, res: Response, next: NextFunction) => { |
| 25 | try { |
nothing calls this directly
no test coverage detected