2026-04-03 16:13:55 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
use Mod\Names\Controllers\NamesController;
|
|
|
|
|
|
|
|
|
|
Route::get('/available/{name}', [NamesController::class, 'available']);
|
|
|
|
|
Route::get('/lookup/{name}', [NamesController::class, 'lookup']);
|
|
|
|
|
Route::get('/search', [NamesController::class, 'search']);
|
|
|
|
|
Route::get('/directory', [NamesController::class, 'directory']);
|
2026-04-04 03:44:53 +01:00
|
|
|
Route::post('/register', [NamesController::class, 'register'])->middleware(['auth.api', 'throttle:10,1']);
|
2026-04-04 00:53:49 +01:00
|
|
|
Route::get('/records/{name}', [NamesController::class, 'records']);
|
2026-04-04 03:44:53 +01:00
|
|
|
Route::post('/records/{name}', [NamesController::class, 'updateRecords'])->middleware(['auth.api', 'throttle:20,1']);
|
2026-04-04 02:06:38 +01:00
|
|
|
Route::get('/ticket/{id}', [NamesController::class, 'ticket']);
|
2026-04-04 02:52:34 +01:00
|
|
|
Route::get('/health', [NamesController::class, 'health']);
|
2026-04-04 06:28:58 +01:00
|
|
|
|
|
|
|
|
// Sunrise domain verification
|
|
|
|
|
Route::get('/sunrise/verify/{name}', [NamesController::class, 'sunriseVerify']);
|
|
|
|
|
Route::get('/sunrise/check/{name}', [NamesController::class, 'sunriseCheck']);
|
2026-04-04 08:30:23 +01:00
|
|
|
|
|
|
|
|
// Pre-registration claims (soft launch)
|
|
|
|
|
Route::post('/claim', [NamesController::class, 'claim'])->middleware('throttle:10,1');
|
|
|
|
|
Route::get('/claims', [NamesController::class, 'listClaims'])->middleware('auth.api');
|
2026-04-04 12:07:38 +01:00
|
|
|
Route::post('/claims/{id}/approve', [NamesController::class, 'approveClaim'])->middleware('auth.api');
|
|
|
|
|
Route::post('/claims/{id}/reject', [NamesController::class, 'rejectClaim'])->middleware('auth.api');
|