remove getBackupUrl

This commit is contained in:
Girish Ramakrishnan
2016-04-10 22:12:06 -07:00
parent 5229222014
commit 4ed368cdd8
3 changed files with 2 additions and 40 deletions

View File

@@ -1,7 +1,6 @@
'use strict';
exports = module.exports = {
getBackupUrl: getBackupUrl,
getRestoreUrl: getRestoreUrl,
copyObject: copyObject,
@@ -65,28 +64,6 @@ function getAllPaged(apiConfig, page, perPage, callback) {
});
}
function getBackupUrl(apiConfig, filename, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof filename, 'string');
assert.strictEqual(typeof callback, 'function');
getBackupCredentials(apiConfig, function (error, credentials) {
if (error) return callback(error);
var s3 = new AWS.S3(credentials);
var params = {
Bucket: apiConfig.bucket,
Key: apiConfig.prefix + '/' + filename,
Expires: 60 * 30 /* 30 minutes */
};
var url = s3.getSignedUrl('putObject', params);
callback(null, { url : url, id: filename });
});
}
function getRestoreUrl(apiConfig, filename, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof filename, 'string');