7 lines
208 B
JavaScript
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)];
|
|
}),
|
|
);
|
|
};
|