(req: Request, res: Response, next: NextFunction)
| 55 | } |
| 56 | |
| 57 | const getAllVariables = async (req: Request, res: Response, next: NextFunction) => { |
| 58 | try { |
| 59 | const { page, limit } = getPageAndLimitParams(req) |
| 60 | const workspaceId = req.user?.activeWorkspaceId |
| 61 | if (!workspaceId) { |
| 62 | throw new InternalFlowiseError( |
| 63 | StatusCodes.NOT_FOUND, |
| 64 | `Error: variablesController.getAllVariables - workspace ${workspaceId} not found!` |
| 65 | ) |
| 66 | } |
| 67 | const apiResponse = await variablesService.getAllVariables(workspaceId, page, limit) |
| 68 | return res.json(apiResponse) |
| 69 | } catch (error) { |
| 70 | next(error) |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | const updateVariable = async (req: Request, res: Response, next: NextFunction) => { |
| 75 | try { |
nothing calls this directly
no test coverage detected