loopbackio / loopback-connector-redis

EXPERIMENTAL: Redis connector for LoopBack.
http://loopback.io/doc/en/lb2/Redis-connector.html
Other
36 stars 46 forks source link

Made redis return empty array and error when no results found #25

Closed penguinpowernz closed 8 years ago

penguinpowernz commented 8 years ago

Previously when accessing a model stored in redis via the API, if the model didn't exist, an empty object would be returned. When trying to call Model.findById the callback would give an undefined error, and an empty or null object. This behaviour is not idiomatic nodejs and breaks the REST behaviour of returning 404 when an object doesn't exist.

slnode commented 8 years ago

Can one of the admins verify this patch?

slnode commented 8 years ago

Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."

jannyHou commented 8 years ago

@penguinpowernz Thank you for contribution, could you take a look at the merging conflict?

penguinpowernz commented 8 years ago

Oops, deleted the branch by accident! Will raise a new PR.