Skip to content

Commit

Permalink
πŸ› Rollback to a post mapped to a hono put request
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Nov 29, 2024
1 parent 023cabf commit cf30dd3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/ponder/src/api/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ type GetMembersParams = {

/**
* Get all the members for a product admin
* todo: The POST request here is mapped to a PUT hono handler --'
*/
ponder.get("/members/:productAdmin", async (ctx) => {
ponder.post("/members/:productAdmin", async (ctx) => {
// Extract wallet
const wallet = ctx.req.param("productAdmin") as Address;
if (!isAddress(wallet)) {
Expand All @@ -73,7 +74,7 @@ ponder.get("/members/:productAdmin", async (ctx) => {

// Get the request params
const { filter, sort, limit, offset, noData, onlyAddress } =
(await ctx.req.parseBody()) as GetMembersParams;
await ctx.req.json<GetMembersParams>();

// Perform the sql query
const productIds = await ctx.db
Expand Down

0 comments on commit cf30dd3

Please sign in to comment.