const participant_ctrl = require('../controllers/participant');
const action_ctrl = require('../controllers/action');
const tache_ctrl = require('../controllers/tache');

module.exports = [
	
	{
		url: '/participant/:participant_id/action',
		method: 'get',
		func: [ participant_ctrl.load_by_id, action_ctrl.get_all ]
    },
    {
		url: '/action',
		method: 'get',
		func: [ action_ctrl.get_all_all ]
	},
	{
		url: '/participant/:participant_id/tache/:tache_id/action',
		method: 'post',
		func: [ participant_ctrl.load_by_id, tache_ctrl.load_by_id, action_ctrl.create ]
	},
	{
		url: '/participant/:participant_id/action/:action_id',
		method: 'get',
		func: [ participant_ctrl.load_by_id, action_ctrl.get_by_id ]
	},
	{
		url: '/participant/:participant_id/action/:action_id',
		method: 'delete',
		func: [ participant_ctrl.load_by_id, action_ctrl.delete_by_id ]
	}
	
];
