wuxt
wuxt copied to clipboard
Fix menu endpoint
There was an issue with the menu endpoint which was throwing an error.
The code inside the constructor was assuming the first parameter was a menu location instead of a menu name. I just removed the code which was looking for the menu name in the locations array and just used the menu name directly.
The endpoint does not throw an error anymore and returns the menu items array as expected.
Hi
the endpoint actually was meant to be for the location, see docs.
BUT, I think it's a great idea to make this available for names as well. Could we tweak this a little, so ?location=
works as expected, but we even provide an ?name=
endpoint, which resolves to your code?
Thanks a lot!
Please accept this pull request. Retrieving menus works with this implementation and doesn't with the current implementation.
@danielauener any update on this?