Remove unused information within backup listing

This commit is contained in:
Johannes Zellner
2015-12-30 20:31:00 +01:00
parent 41c597801f
commit 030faaa5d1
3 changed files with 2 additions and 10 deletions
-1
View File
@@ -53,7 +53,6 @@ function getAllPaged(backupConfig, page, perPage, callback) {
if (result.statusCode !== 200) return callback(new Error(result.text));
if (!result.body || !util.isArray(result.body.backups)) return callback(new Error('Unexpected response'));
// [ { creationTime, boxVersion, restoreKey, dependsOn: [ ] } ] sorted by time (latest first)
return callback(null, result.body.backups);
});
}
+1 -8
View File
@@ -51,16 +51,9 @@ function getAllPaged(backupConfig, page, perPage, callback) {
if (error) return callback(error);
var results = data.Contents.map(function (backup) {
var key = backup.Key.slice(backupConfig.prefix.length + 1);
// This depends on the backups.js format of backup names :-(
var version = key.slice(key.lastIndexOf('-') + 2, -7);
return {
creationTime: backup.LastModified,
boxVersion: version,
restoreKey: key,
dependsOn: [] // FIXME we have no information here
restoreKey: backup.Key.slice(backupConfig.prefix.length + 1)
};
});