New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

larvituser-api

Package Overview
Dependencies
Maintainers
3
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

larvituser-api - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

config/log.json

8

index.js

@@ -41,2 +41,10 @@ 'use strict';

that.api.middleware.splice(1, 0, function (req, res, cb) {
if (req.method.toUpperCase() !== 'GET' && req.rawBody === undefined) {
res.statusCode = 400;
res.end('"Bad Request\nNo body provided"');
log.verbose(logPrefix + 'No body provided.');
return;
}
if (req.rawBody) {

@@ -43,0 +51,0 @@ try {

2

package.json
{
"name": "larvituser-api",
"version": "0.3.0",
"version": "0.3.1",
"description": "REST api built on top of larvituser",

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

@@ -360,2 +360,18 @@ 'use strict';

test('PUT without body', function (t) {
const reqOptions = {};
reqOptions.url = 'http://localhost:' + UserApi.instance.api.lBase.httpServer.address().port + '/user';
reqOptions.method = 'PUT';
reqOptions.json = true;
request(reqOptions, function (err, response, body) {
if (err) return cb(err);
t.equal(response.statusCode, 400);
console.log(body);
t.end();
});
});
test('GET user, malformed statements', function (t) {

@@ -362,0 +378,0 @@ const tasks = [];

@@ -31,2 +31,3 @@ 'use strict';

reqOptions.json = true;
reqOptions.body = {};

@@ -33,0 +34,0 @@ request(reqOptions, function (err, response, body) {

@@ -78,2 +78,4 @@ 'use strict';

reqOptions.method = 'DELETE';
reqOptions.json = true;
reqOptions.body = {};

@@ -80,0 +82,0 @@ request(reqOptions, function (err, response) {

@@ -379,5 +379,7 @@ 'use strict';

reqOptions.method = 'POST';
reqOptions.body = { 'asdfa': 'asdfa' };
reqOptions.json = true;
request(reqOptions, function (err, response) {
if (err) return cb(err);
if (err) throw err;

@@ -384,0 +386,0 @@ t.equal(response.statusCode, 405);

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc