feathers-sequelize
Advanced tools
Comparing version 1.0.7 to 1.0.9
@@ -5,4 +5,6 @@ 'use strict'; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -33,4 +35,2 @@ value: true | ||
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -42,3 +42,3 @@ | ||
var Service = (function () { | ||
var Service = function () { | ||
function Service(options) { | ||
@@ -81,3 +81,3 @@ _classCallCheck(this, Service); | ||
if (this.paginate.default) { | ||
var _ret = (function () { | ||
var _ret = function () { | ||
var limit = Math.min(filters.$limit || _this.paginate.default, _this.paginate.max || Number.MAX_VALUE); | ||
@@ -97,3 +97,3 @@ | ||
}; | ||
})(); | ||
}(); | ||
@@ -177,3 +177,3 @@ if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; | ||
var promise = id === null ? this.find(params) : this.get(id); | ||
var promise = id === null ? this.find(params) : this.Model.findById(id); | ||
@@ -195,3 +195,3 @@ return promise.then(function (data) { | ||
return Service; | ||
})(); | ||
}(); | ||
@@ -198,0 +198,0 @@ function init(Model) { |
@@ -56,3 +56,3 @@ 'use strict'; | ||
Object.keys(sort).forEach(function (name) { | ||
return order.push([name, sort[name] === 1 ? 'ASC' : 'DESC']); | ||
return order.push([name, parseInt(sort[name], 10) === 1 ? 'ASC' : 'DESC']); | ||
}); | ||
@@ -59,0 +59,0 @@ |
{ | ||
"name": "feathers-sequelize", | ||
"description": "A service adapter for Sequelize an SQL ORM", | ||
"version": "1.0.7", | ||
"version": "1.0.9", | ||
"homepage": "https://github.com/feathersjs/feathers-sequelize", | ||
@@ -6,0 +6,0 @@ "main": "lib/", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
28215