Skip to content

Change owner in admin panel - #139

Merged
Flash303 merged 1 commit into
mainfrom
dev
Oct 25, 2026
Merged

Flash303 merged 1 commit into
mainfrom
dev

Conversation

@Flash303

Copy link
Copy Markdown
Owner

This pull request introduces the ability for admins to transfer server ownership to another user. It adds a new backend API endpoint to update a server's owner, ensures the new owner exists, provides error handling for missing users, and updates frontend API utilities and translations to support this feature.

Backend: Server Ownership Transfer

  • Added a new update_server_owner method to the Repository trait and its Postgres implementation, enabling the update of a server's owner by user ID (backend/crates/repository/src/repository.rs, backend/crates/repository/src/postgres.rs). [1] [2]
  • Introduced a new PATCH endpoint /admin/servers/{id}/owner that validates the new owner, checks for user existence via Clerk, and updates the server record (backend/rest-api/src/routes/admin/server.rs). [1] [2]

Backend: Error Handling

  • Added a new UserNotFound error to AppError, mapped it to HTTP 404, and provided a translation key (backend/rest-api/src/error.rs). [1] [2] [3]

Frontend: API and Localization

  • Added updateServerOwner function to the frontend admin API utility to call the new backend endpoint (frontend/app/core/lib/api/admin.ts).
  • Updated translation files (English, German, Spanish, French, Italian, Japanese, Korean, Dutch, Polish) to support the ownership transfer UI and new error messages (frontend/app/locales/*.json). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]

@Flash303
Flash303 merged commit cdfc002 into main Oct 25, 2026
4 checks passed
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.

1 participant