debian-mirror-gitlab/app/assets/javascripts/admin/users/utils.js
2021-03-11 19:13:27 +05:30

7 lines
208 B
JavaScript

export const generateUserPaths = (paths, id) => {
return Object.fromEntries(
Object.entries(paths).map(([action, genericPath]) => {
return [action, genericPath.replace('id', id)];
}),
);
};