Add list pending invitations endpoint #56
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/list-invitations-endpoint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements task 83:
GET /api/users/me/invitations, paginated, scoped to the caller's own pending invitations.GroupMembershipRepository.ListPendingForUserAsync), not filtered in memory.LEFT JOINon the inviter, sinceinvited_by_user_idisON DELETE SET NULL.created_at, group_idfor a stable total ordering, followingGroupRepository.ListForUserAsync's own shape.GET /api/groups. This route lives under/api/users/me, not/api/groups/{groupId}, so task 148'sGroupScopedEndpointAuthorisationTestsenumeration never matches it in the first place; no carve-out needed.No new ADR: this follows the shape ADR-0041/0044/0046/0051 already settled rather than deciding anything new.
Verdict: mergeable
Verified against the pinned SDK (10.0.100), real PostgreSQL via Testcontainers, and mutation testing:
gm.user_id = @UserIdfromSelectPendingInvitationsForUser'sWHEREreddens 4 tests, includingListPendingForUserAsync_AnotherUsersInvitation_NeverAppears.gm.status = 'pending'reddens exactlyListPendingForUserAsync_AnAcceptedMembership_IsNotAnInvitation.LEFT JOINforINNER JOINreddens exactlyListPendingForUserAsync_TheInvitersAccountHasBeenDeleted_StillListsItWithNoInviterDisplayName— anINNER JOINwould silently drop the invitation, confirming theLEFT JOINis load-bearing, not decorative.ORDER BY gm.created_at, gm.group_idproven with three rows sharing onecreated_at, paged 2+1 with no row skipped or duplicated.GroupScopedEndpoints()matches only/api/groups/{groupId}...and/api/places/...;/api/users/me/invitationsmatches neither predicate, so the "no carve-out needed" claim is accurate.OpenApiDocumentTestspath list addition is a real assertion, not a silenced failure — the full path list is asserted, so this would fail without the new entry.Page≥ 1,PageSize1–50, defaults 1/20, refused not clamped).mainhasn't moved (still707201a, PR56's merge base); the siblingfeat/change-member-role-endpointhasn't merged, so no conflict to resolve here.Nothing to change.