Routes (client.php):
- Removed redundant prefixing - Blueprint auto-prefixes with identifier
- Clean paths: /servers/{server}/check and /status
- Added clear comments documenting resulting URLs
Migration:
- Changed enum('status') to string('status') for future flexibility
- Added foreign key constraint: server_uuid -> servers.uuid with cascade delete
- Ensures 'RV-Ready' data integrity - no ghost data on server deletion
Build Script:
- Removed redundant PHP copy logic (Blueprint handles via requests.app)
- Fixed dead code that referenced wrong path for console command
- More targeted sed patterns for better stability
- Added author/version header
Reviewed by: Gemini AI (Architecture Consultant)
Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
21 lines
716 B
PHP
21 lines
716 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use Pterodactyl\Http\Controllers\ModpackAPIController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| ModpackChecker Client Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Blueprint auto-prefixes these with /api/client/extensions/modpackchecker/
|
|
| So our paths here are relative to that prefix.
|
|
|
|
|
*/
|
|
|
|
// Resulting URL: /api/client/extensions/modpackchecker/servers/{server}/check
|
|
Route::post('/servers/{server}/check', [ModpackAPIController::class, 'manualCheck']);
|
|
|
|
// Resulting URL: /api/client/extensions/modpackchecker/status
|
|
Route::get('/status', [ModpackAPIController::class, 'getStatus']);
|