Skip to content

Release | v0.3.0

Latest

Choose a tag to compare

@CodeMeAPixel CodeMeAPixel released this 01 Mar 08:43
a93344e

Added

  • Unified Database CLI Tool - Consolidated shell scripts into cross-platform Go CLI

    • Supports Windows, macOS, and Linux without native shell dependencies
    • db init - Initialize database schema with interactive schema selection
    • db migrate - Run specific schema migrations with validation
    • db reset - Complete database reset with confirmation prompt
    • db list - Display all available schema files with status
    • Makefile integration with environment variable loading from .env
  • Consolidated Next.js API Routes to Go Backend - Complete migration of frontend API routes to backend

    • Moved all /api/admin/ endpoints from Next.js to Go Fiber backend
    • Admin user management: GET/POST /api/admin/users, POST /api/admin/users/roles
    • Admin settings: GET/POST /api/admin/settings, POST /api/admin/settings/test
    • GitHub repositories: GET/POST/PUT/DELETE /api/admin/settings/repos
    • Discord webhooks: GET/POST/PUT/PATCH/DELETE /api/admin/settings/webhooks
    • Admin sync controls: GET/POST /api/admin/sync, GET /api/admin/sync/logs, GET/POST /api/admin/sync/settings
    • Admin servers: GET /api/admin/servers
    • Bearer token authentication middleware for all admin routes
    • Consistent error response format across all endpoints
  • Admin User Management API - Complete user listing and management endpoints

    • GET /api/admin/users - Paginated user listing with filtering, sorting, search
    • Query parameters: page, pageSize, sortField, sortOrder, filter, search
    • Returns paginated response with user data and statistics
    • POST /api/admin/users/roles - Update user role assignments
    • User statistics: totalUsers, migratedUsers, adminCount, activeCount
  • Hytale Token Auto-Push to Pterodactyl - Automatic environment variable updates for game servers

    • Game sessions can be linked to specific Pterodactyl servers via server_id field
    • Background worker automatically pushes refreshed tokens to Pterodactyl every 5 minutes
    • Environment variables HYTALE_SESSION_TOKEN and HYTALE_IDENTITY_TOKEN updated via Client API
    • Schema migration schema_13_hytale_server_link.sql adds server_id column to hytale_game_sessions
    • Graceful degradation: Logs warnings but continues if Pterodactyl push fails
  • User Account API - Full profile management endpoints for dashboard

    • GET /api/v1/dashboard/account - Returns complete user profile (name, email, phone, company, billing email, roles, verification status, last login)
    • POST /api/v1/dashboard/account/resend-verification - Resend email verification with queued email delivery
    • POST /api/v1/dashboard/account/change-email - Request email address change with verification token
    • Nullable field handling for optional user profile columns (username, phoneNumber, companyName, billingEmail)
  • Stale Record Cleanup During Sync - Automatic deletion of records no longer present on the panel

    • Locations, nodes, allocations, nests, and servers are pruned after each sync step
    • Allocations deletion batched across all nodes using collected IDs
    • Server deletion scoped to panelType = 'pterodactyl' with non-null pterodactylId to avoid deleting manually-created records

Fixed

  • Admin Users Data Type Handling - Fixed TIMESTAMP column scanning from PostgreSQL
    • Changed timestamp handling to use time.Time objects with RFC3339 formatting
    • Properly convert database TIMESTAMP columns to ISO 8601 string format in API responses
    • Fixed empty users array issue in admin panel users listing
    • Proper null pointer handling for nullable timestamp fields (lastLoginAt, emailVerifiedTime)
  • Server-Allocation Relationship Sync - Fixed missing foreign key population
    • Added Relationships field to PteroServer struct to capture included allocations from API
    • syncServers() now properly updates server_id foreign key in allocations table
    • Fixes issue where allocations were synced but not linked to their servers
    • All server-allocation relationships now properly populated during full sync
  • Allocation Server ID Column Name - Fixed snake_case vs camelCase mismatch in sync query
    • Changed server_id to "serverId" in allocation UPDATE query to match actual DB column name
    • Allocations now correctly display their associated server names in the admin panel
  • User Account Nullable Username - Fixed 500 error on /api/v1/dashboard/account
    • Changed Username field from string to *string to handle nullable username TEXT column
    • Prevents pgx scan failure when username is NULL