You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
If a note is submitted without a message it's invalid the user is redirected from the original form /note/new back to /note.
I understand that the postNoteAction is being served and processing the request so this is expected behaviour.
Is the only way around this abstracting the core of the postNoteMethod into a new method _handlePostAction() and calling it from both newNoteAction and postNoteAction? Given the example uses annotations I can't see any other way of implementing this.
you mean and then POSTing to newNoteAction in the HTML form rather than postNoteAction? I guess that is possible. Browsers do not make it very easy to do proper REST :-/
you mean and then POSTing to newNoteAction in the HTML form rather than postNoteAction?
Yep that's exactly what I meant. Using standard yaml / xml routing would allow this as I think multiple routes could point to the same action with different patterns and methods. Unfortunately it seems that there are only implementations for FosRestBundle @QueryParam and NelmioApiDoc.
I don't think this is a big issue but I was hoping someone would have a good DRY solution.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If a note is submitted without a message it's invalid the user is redirected from the original form /note/new back to /note.
I understand that the postNoteAction is being served and processing the request so this is expected behaviour.
Is the only way around this abstracting the core of the postNoteMethod into a new method _handlePostAction() and calling it from both newNoteAction and postNoteAction? Given the example uses annotations I can't see any other way of implementing this.
Thoughts @gimler @lsmith77
The text was updated successfully, but these errors were encountered: