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.
Yes the logic happens inside a handler. I simplified the use case to show only a 'self' link, but I've got multiple routes that can be used for this resource--all of which are entries in the plug-in's route table. My thought was to construct the _links by traversing the route paths. But to provide the complete href for each route, I'd need to know the plug-in route prefix.
I could parse the request.path, but that feels like a kludge. I could also pass the prefix as an option to the plugin--probably an easier solution, but also not ideal. If the plugin had a location method (or at least a way to access its prefix) it would make for a cleaner implementation.