restful-goose
Advanced tools
Comparing version 1.3.7-a to 1.3.7-b
@@ -79,3 +79,3 @@ var express = require('express'); | ||
if (!obj || obj.hasOwnProperty('attributes') === false) { | ||
if (!obj || (obj.hasOwnProperty('attributes') === false && obj.hasOwnProperty('relationships') === false)) { | ||
return res.__onError(req, res, { name: 'BadRequest', message: 'Request not a JSON object or attributes property missing' }); | ||
@@ -115,3 +115,3 @@ } | ||
if (!data || !data.attributes) { | ||
if (!data || (data.hasOwnProperty('attributes') === false && data.hasOwnProperty('relationships') === false)) { | ||
return res.__onError(req, res, { name: 'BadRequest', message: 'Request not an object or missing attributes property', detail: { request_body: req.body }}); | ||
@@ -118,0 +118,0 @@ } |
{ | ||
"name": "restful-goose", | ||
"version": "1.3.7a", | ||
"version": "1.3.7b", | ||
"description": "Yet another RESTful microservice generator for Mongoose with an emphasis on flexibility", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -155,3 +155,3 @@ var chai = require('chai'); | ||
}); | ||
it('should respond with 200 success on /:item DELETE', function(done) { | ||
it('should respond with 204 success on /:item DELETE', function(done) { | ||
var item = _.sample(items); | ||
@@ -161,4 +161,3 @@ chai.request(app) | ||
.end(function(err, res) { | ||
expect(res.status).to.equal(200); | ||
expect(res).to.be.json; | ||
expect(res.status).to.equal(204); | ||
expect(res.body).to.be.empty; | ||
@@ -238,3 +237,3 @@ items.splice(_.findIndex(items, item), 1); | ||
}); | ||
it('should respond with 200 success on /:item DELETE', function(done) { | ||
it('should respond with 204 success on /:item DELETE', function(done) { | ||
var item = _.sample(items); | ||
@@ -244,4 +243,3 @@ chai.request(app) | ||
.end(function(err, res) { | ||
expect(res.status).to.equal(200); | ||
expect(res).to.be.json; | ||
expect(res.status).to.equal(204); | ||
expect(res.body).to.be.empty; | ||
@@ -248,0 +246,0 @@ items.splice(_.findIndex(items, item), 1); |
@@ -48,4 +48,3 @@ var chai = require('chai'); | ||
.end(function(err, res) { | ||
expect(res.status).to.equal(200); | ||
expect(res).to.be.json; | ||
expect(res.status).to.equal(204); | ||
expect(res.body).to.be.empty; | ||
@@ -52,0 +51,0 @@ done(); |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
67947
1713