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

sails

Package Overview
Dependencies
Maintainers
1
Versions
236
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sails - npm Package Compare versions

Comparing version 0.7.3 to 0.7.4

12

lib/scaffolds/controller.js

@@ -25,3 +25,3 @@ exports.definition = function(modelName) {

// Normalize WHERE parameter
var where = applyFilter(req.param("sails_filter"), req.param('where') || req.param('search'));
var where = applyFilter(req.param("sails_filter"), req.param('where'), Model);

@@ -35,5 +35,6 @@ // If WHERE is a string, try to interpret it as JSON

var params;
if (!where) {
params = _.extend(req.query || {}, req.params || {}, req.body || {});
params = applyFilter(req.param("sails_filter"),params);
params = applyFilter(req.param("sails_filter"),params,Model);

@@ -59,3 +60,2 @@ // Remove undefined params

// Respond to queries

@@ -79,3 +79,3 @@ var finding = Model.findAll(options);

var params = _.extend(req.query || {}, req.params || {}, req.body || {});
params = applyFilter(req.param("sails_filter"),params);
params = applyFilter(req.param("sails_filter"),params, Model);

@@ -107,3 +107,3 @@ Model.create(params).done(function(err, model) {

var params = _.extend(req.query || {}, req.params || {}, req.body || {});
params = applyFilter(req.param("sails_filter"),params);
params = applyFilter(req.param("sails_filter"),params, Model);

@@ -165,3 +165,3 @@ // Ignore id in params

// (e.g. Mast or Backbone.js)
function applyFilter (sails_filter, data) {
function applyFilter (sails_filter, data, Model) {
if (!data || !_.isObject(data)) return data;

@@ -168,0 +168,0 @@

@@ -26,3 +26,3 @@ {

],
"version": "0.7.3",
"version": "0.7.4",
"description": "API-driven framework for building realtime apps, using MVC conventions (based on Express and Socket.io)",

@@ -29,0 +29,0 @@ "homepage": "http://sailsjs.com",

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