Updates to backup infrastructure

This commit is contained in:
Scott Nonnenberg 2018-12-13 13:41:42 -08:00
parent 47f834cf5c
commit e4babdaef0
14 changed files with 599 additions and 710 deletions

View file

@ -19,6 +19,7 @@ module.exports = {
createOrUpdateGroup,
getGroupById,
getAllGroupIds,
getAllGroups,
bulkAddGroups,
removeGroupById,
removeAllGroups,
@ -567,6 +568,10 @@ async function getAllGroupIds() {
const rows = await db.all('SELECT id FROM groups ORDER BY id ASC;');
return map(rows, row => row.id);
}
async function getAllGroups() {
const rows = await db.all('SELECT id FROM groups ORDER BY id ASC;');
return map(rows, row => jsonToObject(row.json));
}
async function bulkAddGroups(array) {
return bulkAdd(GROUPS_TABLE, array);
}