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

restful-goose

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restful-goose - npm Package Compare versions

Comparing version 1.3.7-a to 1.3.7-b

4

lib/router.js

@@ -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();

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