Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crude

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crude - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

9

lib/controller-crud-base.js

@@ -219,3 +219,3 @@ /*jshint camelcase:false */

}
var itemId = req.params.id || req.body.id;
var itemId = req.body.id || req.params.id;
if (!itemId) {

@@ -267,3 +267,7 @@ return validationError('No "id" field passed');

return this.entity.readOne(query).then(function(doc){
return this.entity.readOne(query).then(function(doc) {
if (!doc) {
throw new Error('Network not found, id: ' + req.params.id);
}
// assign the item to the tpl vars.

@@ -424,3 +428,2 @@ res.locals.item = doc;

CrudCmd.prototype._handleReadError = function(req, res, view, err) {
console.log('WTF:', err, view);
if (this.isJson(req)) {

@@ -427,0 +430,0 @@ res.status(401).json(this.jsonError(err));

@@ -40,2 +40,2 @@ /**

};
};
};
{
"name": "crude",
"description": "Seamless CRUD control operations for node.",
"version": "0.4.1",
"version": "0.4.2",
"homepage": "https://github.com/talksession/node-crude",

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

@@ -33,2 +33,4 @@ # node-crude

- **v0.4.2**, *01 May 2014*
- Check for `req.body.id` first, `req.params.id` second on update.
- **v0.4.1**, *24 Apr 2014*

@@ -35,0 +37,0 @@ - Enable customizable entityCreate op.

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