Add platform admin hosting API for Ladill account provisioning.
Deploy Ladill Hosting / deploy (push) Successful in 1m29s
Deploy Ladill Hosting / deploy (push) Successful in 1m29s
Expose authenticated service endpoints for assigning, listing, renewing, and managing hosting accounts from the platform, with tests and deploy docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,9 +1,24 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\Api\PlatformHostingController;
|
||||
use App\Services\Mailbox\MailboxClient;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::middleware('auth.service:platform')->prefix('platform')->group(function (): void {
|
||||
Route::get('/hosting-products', [PlatformHostingController::class, 'products']);
|
||||
Route::get('/users/{publicId}/hosting-accounts', [PlatformHostingController::class, 'index'])
|
||||
->where('publicId', '[A-Za-z0-9\-]+');
|
||||
Route::post('/users/{publicId}/hosting-accounts', [PlatformHostingController::class, 'assign'])
|
||||
->where('publicId', '[A-Za-z0-9\-]+');
|
||||
Route::patch('/hosting-accounts/{account}/duration', [PlatformHostingController::class, 'updateDuration'])
|
||||
->whereNumber('account');
|
||||
Route::post('/hosting-accounts/{account}/renew', [PlatformHostingController::class, 'renew'])
|
||||
->whereNumber('account');
|
||||
Route::post('/hosting-accounts/{account}/unsuspend', [PlatformHostingController::class, 'unsuspend'])
|
||||
->whereNumber('account');
|
||||
});
|
||||
|
||||
// Ladill Email API (v1) — authenticated with Sanctum personal access tokens
|
||||
// minted on the Developers page. Read-only for now: identity + mailboxes.
|
||||
Route::middleware('auth:sanctum')->prefix('v1')->group(function () {
|
||||
|
||||
Reference in New Issue
Block a user