migrate to "export default"
also, set no-use-before-define in linter
This commit is contained in:
+11
-10
@@ -1,19 +1,10 @@
|
||||
import assert from 'node:assert';
|
||||
import BoxError from './boxerror.js';
|
||||
import crypto from 'node:crypto';
|
||||
import * as database from './database.js';
|
||||
import database from './database.js';
|
||||
import eventlog from './eventlog.js';
|
||||
import safe from 'safetydance';
|
||||
|
||||
export {
|
||||
get,
|
||||
getIcons,
|
||||
getIcon,
|
||||
add,
|
||||
list,
|
||||
listBackupIds,
|
||||
del,
|
||||
};
|
||||
|
||||
const ARCHIVE_FIELDS = [ 'archives.id', 'backupId', 'archives.creationTime', 'backups.remotePath', 'backups.siteId', 'backups.manifestJson', 'backups.appConfigJson', '(archives.icon IS NOT NULL) AS hasIcon', '(archives.packageIcon IS NOT NULL) AS hasPackageIcon' ];
|
||||
|
||||
@@ -105,3 +96,13 @@ async function del(archive, auditSource) {
|
||||
|
||||
await eventlog.add(eventlog.ACTION_ARCHIVES_DEL, auditSource, { id: archive.id, backupId: archive.backupId });
|
||||
}
|
||||
|
||||
export default {
|
||||
get,
|
||||
getIcons,
|
||||
getIcon,
|
||||
add,
|
||||
list,
|
||||
listBackupIds,
|
||||
del,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user