-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The road to 1.0.0 #115
Comments
I think it is ok to remove the But I would like to keep the DELETE: Although it does not make much sense to remove entire collections using DELETE, you can include query parameters in the DELETE call to bulk delete documents that are matching your query. Removing the code mentioned in https://github.com/florianholzapfel/express-restify-mongoose/blob/1.0.0-dev/lib/express-restify-mongoose.js#L262 would be a breaking change for existing users. I would like to keep this one. |
strict might be default. |
You're obviously right about delete, for some reason I completely forgot about passing query parameters. I'll take care of removing strict today. I agree, L262 would break client apps in a major way so it must stay. What do you think about outputFn? I've come across cases where having access to the I was thinking maybe it could actually be middleware or close to it:
or
Something like that. Ideas? |
Yes, having the original request available in the output function can really be useful. I would prefer the second variant, since it provides a status. |
Oh, I forgot to add status to the first, but an object seems better suited anyway as it leaves the door open to pass more parameters. I'm not sure if next is useful at all, but I guess going with a standard signature is a good direction to head in and someone might stumble on a use-case for it. |
@florianholzapfel One more thing. The async prereq callback should be |
also im using promisification but for cb(res) not that great On Thu, May 7, 2015 at 3:52 PM, Pier-Luc Gendreau [email protected]
--Lukas 'SyZer' Gintowt |
@florianholzapfel Sorry for the annoyance once more! I'd like your input on this one. I hadn't realized, but there are repercussions to passing The situation arises at a few places, including there: https://github.com/florianholzapfel/express-restify-mongoose/blob/master/lib/express-restify-mongoose.js#L465 The way I see it, either we pass I like the former, but the latter is definitely more reasonable and less breaking. |
next() allows using other middleware On Thu, May 7, 2015 at 5:49 PM, Pier-Luc Gendreau [email protected]
--Lukas 'SyZer' Gintowt |
I agree, however, (and I could be wrong here) the problem with passing So if we do that, I'm pretty sure it would be necessary to remove the post* methods. I'm going to send the PR without next for now while this is being figured out. |
@florianholzapfel I've noticed a few TODO's in your code:
These two are related to
options.strict
which states:What I'm getting to is: is
options.strict
even necessary?I haven't really looked deep into these two. The former could be deprecated, but removing it entirely would be a huge breaking change I believe. The latter mostly looks like a refactor/feature, which can wait.
Also, it would be useful if the
req
object was passed tooutputFn
.Finally, I've gone through issues and there doesn't seem to be anything in there that would introduce more breaking changes. Could you confirm?
@syzer I'll tackle #72 sometimes in the future, I think it's a useful feature and definitely one I'd use. As for PR #56, feel free to chime in!
Other than that, quite a few issues (#112, #109, #81, #78, #52 and #51) seem to be at least vaguely related, but non-breaking.
The text was updated successfully, but these errors were encountered: