On Fri, Oct 29, 2021 at 2:05 AM Jeremy Evans <
jeremy...@gmail.com> wrote:
>
> On Thu, Oct 28, 2021 at 9:27 PM Diego Viola <
diego...@gmail.com> wrote:
>>
>> Hi,
>>
>> I have the following API code that I've been working on:
>>
>>
https://gist.github.com/diegoviola/41732846978bf843ad705ce73d0097f6#file-external-rb-L17-L22
>>
>> I'm currently stuck trying to extract the v1 part to its own file, I'd like to re-use the authentication from the external.rb and split out v1 so that if I were to add v2, the file won't grow too big.
>>
>> I'm kind of new to Roda and am stuck with this, I would appreciate any suggestions.
>
>
> The important thing to realize is that the default argument for r.hash_routes is the already matched path. You can make things easier by making the namespace for your hash routes use the same path. You should be able to do:
Makes sense, thank you so much Jeremy. That indeed works.