Skip to content

Commit

Permalink
version 0.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
florianholzapfel committed Jun 28, 2013
1 parent 540281e commit 51a6e7e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ DELETE http://localhost/api/v1/customers/:id

### Query
```
GET http://localhost/api/v1/customers/?name=~regex
GET http://localhost/api/v1/customers/?name=value
GET http://localhost/api/v1/customers/?name=>value
GET http://localhost/api/v1/customers/?name=>=value
Expand Down Expand Up @@ -95,6 +96,7 @@ serve(app, model, [options])
## Contributors
* Enric León (https://github.com/nothingbuttumbleweed)
* David Higginbotham (https://github.com/dhigginbotham)
* Jonathan Greenemeier (https://github.com/6eDesign)

## Formalia

Expand Down
15 changes: 1 addition & 14 deletions lib/express-restify-mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
**/
var util = require('util');

var restify = function(app, model, options) {
var restify = function(app, model, options) {
if(!options) {
options = { };
}
Expand Down Expand Up @@ -66,19 +66,6 @@ var util = require('util');
next();
}

function cleanQuery(req, res, next) {
queryOptions.current = {};
for(var key in req.query) {
if(!model.schema.paths.hasOwnProperty(key)) {
if(queryOptions.protected.indexOf(key) != -1) {
queryOptions.current[key] = req.query[key];
}
delete req.query[key];
}
}
next();
}

function buildQuery(query, options) {
for(var key in options) {
query.where(key);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "express-restify-mongoose",
"description": "Easily restify mongoose database",
"version": "0.0.8",
"version": "0.0.9",
"author": {
"name": "Florian Holzapfel",
"email": "flo.holzapfel@gmail.com"
Expand Down

0 comments on commit 51a6e7e

Please sign in to comment.