This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/backend/routes/functions.js

16 lines
433 B
JavaScript
Raw Normal View History

const { Router } = require('express');
const functionsController = require('../controllers/functions');
const FunctionsRouter = Router();
FunctionsRouter.route('/')
// Récupère les fonctions
.get(functionsController.getFunctions);
FunctionsRouter.route('/:functionName')
// Exécute la fonction demandée en paramètre
.post(functionsController.executeFunctionName);
module.exports = FunctionsRouter;