wuxt icon indicating copy to clipboard operation
wuxt copied to clipboard

Fix menu endpoint

Open marcbelletre opened this issue 5 years ago • 3 comments

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.

marcbelletre avatar Feb 03 '20 10:02 marcbelletre

Hi

the endpoint actually was meant to be for the location, see docs. image

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!

northosts avatar Mar 10 '20 07:03 northosts

Please accept this pull request. Retrieving menus works with this implementation and doesn't with the current implementation.

holygekko avatar Jan 03 '21 13:01 holygekko

@danielauener any update on this?

defaye avatar Jan 13 '21 11:01 defaye