Socket
Socket
Sign inDemoInstall

evado-api-base

Package Overview
Dependencies
0
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.4.1 to 4.4.2

controller/DataHistoryController.js

1

config/default-classes.js

@@ -17,3 +17,4 @@ /**

'model/DataHistory': require('../model/DataHistory'),
'model/RawFile': require('../model/RawFile'),
};

38

controller/S3Controller.js

@@ -18,8 +18,13 @@ /**

});
if (!await raw.upload(this.getPostParams())) {
return this.sendText(this.translate(raw.getFirstError()), 400);
raw.setData(this.getPostParams());
if (!await raw.save()) {
return this.sendText(this.translate(raw.getFirstError()), Response.BAD_REQUEST);
}
const id = raw.getId();
const url = await raw.getSignedUploadUrl();
this.sendJson({id, url});
try {
const id = raw.getId();
const url = await raw.getSignedUploadUrl();
this.sendJson({id, url});
} catch (err) {
this.handleError(err, raw.getStorage());
}
}

@@ -32,4 +37,8 @@

const behavior = this.createFileBehavior(model);
const url = await behavior.getSignedDownloadUrl();
this.sendText(url);
try {
const url = await behavior.getSignedDownloadUrl();
this.sendText(url);
} catch (err) {
this.handleError(err, behavior.getStorage());
}
}

@@ -40,5 +49,18 @@

}
handleError (data, storage) {
if (storage.isConnectionError(data)) {
return this.handleConnectionError(...arguments);
}
throw data;
}
handleConnectionError (data) {
this.log('error', data);
this.send('Service is unavailable. Try again later', Response.SERVICE_UNAVAILABLE);
}
};
module.exports.init(module);
const BadRequest = require('areto/error/http/BadRequest');
const BadRequest = require('areto/error/http/BadRequest');
const Response = require('areto/web/Response');
{
"name": "evado-api-base",
"version": "4.4.1",
"version": "4.4.2",
"description": "Evado Framework data access API module",

@@ -5,0 +5,0 @@ "author": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc