db put should take parent's shared by default.

This commit is contained in:
vdv committed 2023-02-13 10:56:48 +01:00
1 parent 9ea29b368f
commit e445a7e1af
4 files changed
+22 -14

No files matched your search

+9
View File
@@ -130,4 +130,13 @@ export const route = (route, coding = {}) => {
};
};
export const getParentId = (id) => {
const tokens = id.split('/').slice(0, -1);
if (['1wpt', '2rte', '3trk'].includes(tokens.at(-1))) {
tokens.splice(-1);
}
const parentId = tokens.join('/');
return parentId;
};
export default route;