Repository navigation
Conversation
Enhance categories, languages, and admin features
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
server_categoryandserver_languageENUM types and correspondingcategoriesandlanguagesarray columns to theserverstable, with migrations to add missing values as needed. [1] [2] [3] [4]Server,ServerRow, andDraftServerstructs to includecategoriesandlanguagesfields, and implemented the corresponding enums in Rust. [1] [2] [3] [4] [5]Repository and API Layer Updates:
rename_servermethod. [1] [2] [3]categoriesandlanguagesfields when fetching servers. [1] [2] [3]Admin API Key Authentication:
ADMIN_API_KEYenvironment 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 thex-admin-keyheader andAuthorization: Bearerheader. [1] [2] [3] [4] [5]Error Handling Improvements:
BadRequestvariant forAppErrorto standardize API responses for invalid parameters. [1] [2] [3]Admin Route Enhancements:
/admin/servers/bulkPATCH 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.