Skip to content

feat: add GET /grantees/:address/users endpoint#730

Open
raymondjacobson wants to merge 2 commits intomainfrom
rj-grantee
Open

feat: add GET /grantees/:address/users endpoint#730
raymondjacobson wants to merge 2 commits intomainfrom
rj-grantee

Conversation

@raymondjacobson
Copy link
Member

Summary

  • Adds GET /v1/grantees/:address/users endpoint that returns all users who have authorized a given grantee wallet address via the grants table
  • Supports is_approved (optional) and is_revoked (default false) query filters
  • Supports limit/offset pagination; returns the full user model

Test plan

  • TestGetGranteeUsersNoParams — default params return non-revoked grants across all approval statuses
  • TestGetGranteeUsersApprovedis_approved=true filters to only approved grants
  • TestGetGranteeUsersNotApprovedis_approved=false filters to only unapproved grants
  • TestGetGranteeUsersRevokedis_revoked=true returns revoked grants
  • TestGetGranteeUsersNotFound — unknown address returns empty list with 200
  • TestGetGranteeUsersPaginationlimit=1 returns a single result
  • TestGetGranteeUsersInvalidParams — invalid param values return 400

🤖 Generated with Claude Code

raymondjacobson and others added 2 commits March 18, 2026 17:33
Returns paginated full user models for all users who have authorized a
given grantee wallet address via the grants table. Supports is_approved
and is_revoked filters, and limit/offset pagination.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Allows callers to pass the address with or without the 0x prefix.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
AND (@is_approved::boolean IS NULL OR g.is_approved = @is_approved)
ORDER BY g.created_at DESC
LIMIT @limit
OFFSET @offset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot what indexes do we have on this table? is this fast?

Copy link
Contributor

Copilot AI commented Mar 19, 2026

@rickyrombo I've opened a new pull request, #731, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants