elysiajs / eden

Fully type-safe Elysia client
MIT License
169 stars 40 forks source link

Path parameter doesn't work in Eden Treaty 2 #57

Closed hagishi closed 7 months ago

hagishi commented 7 months ago

Hi.

I'm trying out Eden Treaty 2, but the path parameter isn't working as expected. Here's the code I tried

const app = new Elysia({ aot: false }).get(
  "/users/:id",
  ({ params }) => params.id
);
await treaty(app).users({ id: 1 }).get();
treaty(app).users({ id: 1 }).get is not a function. 
(In 'treaty(app).users({ id: 1 }).get()', 'treaty(app).users({ id: 1 }).get' is undefined)

If there's something wrong with the way I've written it, I would like to know.

version

hagishi commented 7 months ago

@elysiajs/eden: 1.0.0-rc.4 is working

hagishi commented 7 months ago

We confirmed it's working