db put should take parent's shared by default.
This commit is contained in:
1 parent
9ea29b368f
commit
e445a7e1af
4 files changed
+22
-14
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user