mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-10-30 11:24:14 +00:00
revamped db schema and implemented some simple api
This commit is contained in:
1 parent
8c287f06df
commit
47bb642854
19 files changed
+1005
-592
No files matched your search
@@ -0,0 +1,23 @@
|
||||
function scrubIds(tuples) {
|
||||
return tuples.map((t) => {
|
||||
delete t.id;
|
||||
return t;
|
||||
});
|
||||
}
|
||||
|
||||
function rewriteKeys(tuples, obj) {
|
||||
return tuples.map((t) => {
|
||||
Object.keys(obj).forEach((k) => {
|
||||
if (k in t) {
|
||||
t[obj[k]] = t[k];
|
||||
delete t[k];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
scrubIds,
|
||||
rewriteKeys
|
||||
};
|
||||
Reference in new issue
Block a user