Fills the gaps between the admin panel screens and the backend: a full free-text + slide-count + language -> AI-generated presentation flow with new slide-cloning logic in TemplateFillService, a "my presentations" list endpoint, a swappable payment-gateway structure for wallet top-ups (fake driver for now), and avatar upload / public-profile toggle / account deletion / password change / notification preference endpoints. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
57 lines
2.6 KiB
PHP
57 lines
2.6 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Api\AuthController;
|
|
use App\Http\Controllers\Api\CategoryController;
|
|
use App\Http\Controllers\Api\NotificationController;
|
|
use App\Http\Controllers\Api\ProfileController;
|
|
use App\Http\Controllers\Api\TemplateController;
|
|
use App\Http\Controllers\Api\TemplateGenerationController;
|
|
use App\Http\Controllers\Api\WalletController;
|
|
use App\Http\Controllers\Api\WalletDepositController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::prefix('auth')->group(function (): void {
|
|
Route::post('register', [AuthController::class, 'register']);
|
|
Route::post('login', [AuthController::class, 'login']);
|
|
});
|
|
|
|
Route::get('categories', [CategoryController::class, 'index']);
|
|
|
|
Route::prefix('templates')->group(function (): void {
|
|
Route::get('/', [TemplateController::class, 'index']);
|
|
Route::get('{template:slug}', [TemplateController::class, 'show']);
|
|
|
|
Route::middleware('auth:sanctum')->group(function (): void {
|
|
Route::post('{template:slug}/generate', [TemplateGenerationController::class, 'store']);
|
|
Route::post('{template:slug}/generate-from-text', [TemplateGenerationController::class, 'storeFromText']);
|
|
});
|
|
});
|
|
|
|
Route::get('wallet/deposits/{deposit}/callback', [WalletDepositController::class, 'callback'])->name('api.wallet.deposits.callback');
|
|
|
|
Route::middleware('auth:sanctum')->group(function (): void {
|
|
Route::get('profile', [ProfileController::class, 'show']);
|
|
Route::put('profile', [ProfileController::class, 'update']);
|
|
Route::put('profile/password', [ProfileController::class, 'changePassword']);
|
|
Route::delete('profile', [ProfileController::class, 'destroy']);
|
|
|
|
Route::prefix('wallet')->group(function (): void {
|
|
Route::get('/', [WalletController::class, 'show']);
|
|
Route::get('transactions', [WalletController::class, 'transactions']);
|
|
Route::post('deposits', [WalletDepositController::class, 'store']);
|
|
});
|
|
|
|
Route::prefix('notifications')->group(function (): void {
|
|
Route::get('/', [NotificationController::class, 'index']);
|
|
Route::post('read-all', [NotificationController::class, 'markAllAsRead']);
|
|
Route::get('preferences', [NotificationController::class, 'preferences']);
|
|
Route::put('preferences', [NotificationController::class, 'updatePreferences']);
|
|
});
|
|
|
|
Route::prefix('generations')->group(function (): void {
|
|
Route::get('/', [TemplateGenerationController::class, 'index']);
|
|
Route::get('{generation:uuid}', [TemplateGenerationController::class, 'show']);
|
|
Route::get('{generation:uuid}/download', [TemplateGenerationController::class, 'download'])->name('api.generations.download');
|
|
});
|
|
});
|