Is there a way to redirect to collection (by name, for example) within Smart Action handler?
Because right now the only way I found in docs is to provide url containing several segments, like so:
// Internal redirection
router.post('/actions/show-some-activity', permissionMiddlewareCreator.smartAction(),
(req, res) => {
res.send({
success: 'Navigated to the activity view.',
redirectTo: '/MyProject/MyEnvironment/MyTeam/data/20/index/record/20/108/activity',
});
}
);
In this approach I understand how to get the MyTeam
segment - from user
defined on incoming request.
Where should I get values for MyProject
and MyEnvironment
on the back-end?