NamesMT / hono-adapter-aws-lambda

MIT License
7 stars 0 forks source link

`.route()` grouping breaks trigger event routes. #1

Closed NamesMT closed 6 months ago

NamesMT commented 6 months ago

Trigger event routes/paths support works as a simple wrapper that gets the eventSource, and transforms it into method:TRIGGER path:eventSource Request for Hono to process, we would then register routes on TRIGGER method.
For it to work perfectly, the paths of the eventSource should never intended to be prefixed, i.e: TRIGGER method should never be prefixed

Currently Hono doesn't provide any (and I can't find hack-able) way to get or skip the prefix of .route() grouping, so, Hono instances with trigger events would break after getting grouped with .route()

NamesMT commented 6 months ago

Some possible solutions:

NamesMT commented 6 months ago

Solved in e834b15