- Add ZiggyVue plugin to app.js setup (fixes 'route is not a function' in all Vue template usages) - Add ziggy-js as production dependency (was missing) - Add CSRF meta tag to app.blade.php - Add date formatting helpers to Services/Index.vue - Name api.songs resource route to avoid Ziggy collision - Increase Playwright timeout to 90s for CI stability - Reduce sync test polling from 325 to 50 attempts
52 lines
2 KiB
PHP
52 lines
2 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\ProFileController;
|
|
use App\Http\Controllers\ServiceSongController;
|
|
use App\Http\Controllers\SongController;
|
|
use App\Http\Controllers\TranslationController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| API Routen
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Alle API-Routen sind authentifizierungspflichtig und verwenden
|
|
| das Prefix /api automatisch durch die Laravel API-Routing-Konvention.
|
|
|
|
|
*/
|
|
|
|
Route::middleware('auth:sanctum')->group(function () {
|
|
Route::apiResource('songs', SongController::class)->names('api.songs');
|
|
|
|
|
|
Route::post('/service-songs/{serviceSongId}/assign', [ServiceSongController::class, 'assignSong'])
|
|
->name('api.service-songs.assign');
|
|
|
|
Route::post('/service-songs/{serviceSongId}/request', [ServiceSongController::class, 'requestSong'])
|
|
->name('api.service-songs.request');
|
|
|
|
Route::post('/service-songs/{serviceSongId}/unassign', [ServiceSongController::class, 'unassign'])
|
|
->name('api.service-songs.unassign');
|
|
|
|
Route::patch('/service-songs/{serviceSongId}', [ServiceSongController::class, 'update'])
|
|
->name('api.service-songs.update');
|
|
|
|
// Übersetzung
|
|
Route::post('/translation/fetch-url', [TranslationController::class, 'fetchUrl'])
|
|
->name('api.translation.fetch-url');
|
|
|
|
Route::post('/songs/{song}/translation/import', [TranslationController::class, 'import'])
|
|
->name('api.songs.translation.import');
|
|
|
|
Route::delete('/songs/{song}/translation', [TranslationController::class, 'destroy'])
|
|
->name('api.songs.translation.destroy');
|
|
|
|
// .pro Datei Upload und Download (Placeholder)
|
|
Route::post('/songs/import-pro', [ProFileController::class, 'importPro'])
|
|
->name('api.songs.import-pro');
|
|
|
|
Route::get('/songs/{song}/download-pro', [ProFileController::class, 'downloadPro'])
|
|
->name('api.songs.download-pro');
|
|
});
|