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

Empty result returns error to use for 404 #42

Closed penguinpowernz closed 7 years ago

penguinpowernz commented 7 years ago

THIRD TIMES A CHARM!

slnode commented 7 years ago

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

slnode commented 7 years ago

Can one of the admins verify this patch?

slnode commented 7 years ago

Can one of the admins verify this patch?

penguinpowernz commented 7 years ago

@jannyHou @superkhau I think I did it finally :D

superkhau commented 7 years ago

I think this is going in the wrong direction. The connector should not have any knowledge of status codes, it should just return the result and let strong-remoting figure out the status codes.

superkhau commented 7 years ago

I guess to be more clear, we should reject this PR and @penguinpowernz you can probably look into strong-remoting and do it at that level (check for results that are empty and respond with the correct codes so it affects more than just redis).

penguinpowernz commented 7 years ago

Is there any documentation for strong remoting? Or a guide on how implement a connector?

superkhau commented 7 years ago

@penguinpowernz See https://loopback.io/doc/en/lb2/Building-a-connector.html

slnode commented 7 years ago

Can one of the admins verify this patch?

superkhau commented 7 years ago

Closing as rejected, feel free to submit another PR to strong-remoting instead.