Remove the backup prefix from the key
This commit is contained in:
@@ -51,13 +51,15 @@ 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 = backup.Key.slice(backup.Key.lastIndexOf('-') + 2, -7);
|
||||
var version = key.slice(key.lastIndexOf('-') + 2, -7);
|
||||
|
||||
return {
|
||||
creationTime: backup.LastModified,
|
||||
boxVersion: version,
|
||||
restoreKey: backup.Key,
|
||||
restoreKey: key,
|
||||
dependsOn: [] // FIXME we have no information here
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user