Cleanup and modernize S3Adapter to ES6 syntax.

This commit is contained in:
Nikita Lutsenko
2016-02-09 19:52:25 -08:00
parent fe5e511ca3
commit 07c9c1d648
6 changed files with 96 additions and 89 deletions

View File

@@ -19,7 +19,7 @@ export class FilesController {
return (req, res) => {
let config = new Config(req.params.appId);
let filename = req.params.filename;
this._filesAdapter.getFileDataAsync(config, filename).then((data) => {
this._filesAdapter.getFileData(config, filename).then((data) => {
res.status(200);
var contentType = mime.lookup(filename);
res.set('Content-type', contentType);
@@ -62,7 +62,7 @@ export class FilesController {
}
let filename = rack() + '_' + req.params.filename + extension;
this._filesAdapter.createFileAsync(req.config, filename, req.body).then(() => {
this._filesAdapter.createFile(req.config, filename, req.body).then(() => {
res.status(201);
var location = this._filesAdapter.getFileLocation(req.config, filename);
res.set('Location', location);