Skip to content

Enhance categories, languages, and admin features - #158

Merged
Flash303 merged 13 commits into
mainfrom
dev
Nov 14, 2026
Merged

Flash303 merged 13 commits into
mainfrom
dev

Conversation

@Flash303

Copy link
Copy Markdown
Owner

This pull request introduces support for categorizing Minecraft servers by type and language, adds new admin API key-based authentication for admin routes, and provides an endpoint for bulk updating server metadata. Additionally, it improves error handling and updates the database schema to support the new features.

Database and Model Changes:

  • Added server_category and server_language ENUM types and corresponding categories and languages array columns to the servers table, with migrations to add missing values as needed. [1] [2] [3] [4]
  • Updated the Server, ServerRow, and DraftServer structs to include categories and languages fields, and implemented the corresponding enums in Rust. [1] [2] [3] [4] [5]

Repository and API Layer Updates:

  • Extended repository methods and trait to support updating server name, categories, and languages in a single call, replacing the previous rename_server method. [1] [2] [3]
  • Updated queries to include the new categories and languages fields when fetching servers. [1] [2] [3]

Admin API Key Authentication:

  • Added ADMIN_API_KEY environment variable and logic to allow admin routes to be accessed via a static API key in addition to Clerk admin JWTs. The middleware checks both the x-admin-key header and Authorization: Bearer header. [1] [2] [3] [4] [5]

Error Handling Improvements:

  • Introduced a new BadRequest variant for AppError to standardize API responses for invalid parameters. [1] [2] [3]

Admin Route Enhancements:

  • Added a new /admin/servers/bulk PATCH endpoint for bulk updating servers, using the new category and language fields. [1] [2]

These changes collectively provide a foundation for richer server metadata and more flexible admin automation.

@Flash303
Flash303 merged commit 6908422 into main Nov 14, 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