Skip to content

Add ListUserUploads admin RPC#8668

Merged
aapeliv merged 1 commit into
developfrom
backend/feature/admin-list-user-uploads
May 18, 2026
Merged

Add ListUserUploads admin RPC#8668
aapeliv merged 1 commit into
developfrom
backend/feature/admin-list-user-uploads

Conversation

@aapeliv

@aapeliv aapeliv commented May 18, 2026

Copy link
Copy Markdown
Member

Adds a new ListUserUploads RPC to the Admin gRPC service so admins can fetch all photo uploads created by a given user (identified by username, email, or user id). Results are ordered newest-first with cursor-based pagination on (created, key), so identical timestamps still paginate deterministically. Each UserUpload includes the key, filename, full/thumbnail URLs, credit, and creation time.

Testing

  • Added backend tests in test_admin.py: basic listing (verifying fields, URLs, and credit), pagination across pages, and the user-not-found case.
  • Ran make protos, make format, and make mypy (admin.py clean; only 2 pre-existing errors in unrelated files).
  • uv run pytest src/tests/test_admin.py -k ListUserUploads passes.

Backend checklist

  • Added tests for any new code or added a regression test if fixing a bug
  • Run the backend locally and it works
  • Added migrations if there are any database changes, rebased onto develop if necessary for linear migration history

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

This PR was created with the Couchers PR skill.

Lets admins fetch all photo uploads created by a given user, with
cursor-based pagination ordered newest-first.
@vercel

vercel Bot commented May 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
couchers Ready Ready Preview May 18, 2026 3:21am

Request Review

@aapeliv
aapeliv merged commit 608c71e into develop May 18, 2026
6 checks passed
@aapeliv
aapeliv deleted the backend/feature/admin-list-user-uploads branch May 18, 2026 03:31
@github-actions

Copy link
Copy Markdown
Contributor

📝 Release Notes

This PR does not need to be included in release notes.

Reason: This PR adds an internal admin-only backend RPC for moderators/admins to list a user's uploads. It does not introduce a user-facing feature or noticeable end-user improvement, and it is not a major infrastructure change that users would care about in release notes.

🤖 Bot Debug Information

Model: couchers.openai.gpt-5.4
Decision: exclude
Reasoning: This PR adds an internal admin-only backend RPC for moderators/admins to list a user's uploads. It does not introduce a user-facing feature or noticeable end-user improvement, and it is not a major infrastructure change that users would care about in release notes.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant