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