-
Notifications
You must be signed in to change notification settings - Fork 122
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
Can private methods be used without sanitizeParams? #155
Comments
Hm, I don't know right now. I have to think it over. |
Why else the private methods should be documented? |
They are not private methods, just I don't want to cause a breaking change with them. E.g if users (using the previous version of DB service) created |
Mm.. maybe I explained that badly, the propose is only to move the parsingParams inside the private methods.... Is there an actual problem in this? At least you get the params passed to the methods treated just like they were parameters passed directly to the pure API action... |
No any exact reason. |
So, any ideas on this? |
If we change it, it will cause breaking changes. |
Ok, so this cannot be done or has some meaning and it has to be paused to the next major release? |
We can do it, just we should update the major version. Could you make a PR? |
I will think about that, if I find some time to do that... |
PR made :) |
Hi,
I've noticed that private methods like
_find
or_create
are documented in the wiki. I personally have used them in my project for overriding the default actions of the Db Adapter adding or removing something in the endpoint but at the end using the relative private method to accomplish the main goal of the action.Something like this:
The problem is that sometimes the params for the private method are not quite correct and calling the private method without calling
sanitizeParams
can bring to unexpected results.. I was wondering: may be the case to move thesanitizeParams
inside the private method so when I try to override some default action I can be sure that the params are correctly parsed?The text was updated successfully, but these errors were encountered: