diff --git a/app/Http/Controllers/Api/PhotoboothConnectController.php b/app/Http/Controllers/Api/PhotoboothConnectController.php index aef8377..d1c9ddf 100644 --- a/app/Http/Controllers/Api/PhotoboothConnectController.php +++ b/app/Http/Controllers/Api/PhotoboothConnectController.php @@ -33,7 +33,7 @@ class PhotoboothConnectController extends Controller return response()->json([ 'data' => [ - 'upload_url' => route('api.v1.photobooth.sparkbooth.upload'), + 'upload_url' => route('api.v1.photobooth.upload'), 'username' => $setting->username, 'password' => $setting->password, 'expires_at' => optional($setting->expires_at)->toIso8601String(), diff --git a/app/Http/Resources/Tenant/PhotoboothStatusResource.php b/app/Http/Resources/Tenant/PhotoboothStatusResource.php index 1623073..a0bf27d 100644 --- a/app/Http/Resources/Tenant/PhotoboothStatusResource.php +++ b/app/Http/Resources/Tenant/PhotoboothStatusResource.php @@ -47,7 +47,7 @@ class PhotoboothStatusResource extends JsonResource 'password' => $password, 'path' => $eventSetting?->path, 'ftp_url' => $isSparkbooth ? null : $this->buildFtpUrl($eventSetting, $settings, $password), - 'upload_url' => $isSparkbooth ? route('api.v1.photobooth.sparkbooth.upload') : null, + 'upload_url' => $isSparkbooth ? route('api.v1.photobooth.upload') : null, 'expires_at' => optional($activeExpires)->toIso8601String(), 'rate_limit_per_minute' => (int) $settings->rate_limit_per_minute, 'ftp' => [ @@ -62,7 +62,7 @@ class PhotoboothStatusResource extends JsonResource 'username' => $mode === 'sparkbooth' ? $eventSetting?->username : null, 'password' => $mode === 'sparkbooth' ? $password : null, 'expires_at' => $mode === 'sparkbooth' ? optional($eventSetting?->expires_at)->toIso8601String() : null, - 'upload_url' => route('api.v1.photobooth.sparkbooth.upload'), + 'upload_url' => route('api.v1.photobooth.upload'), 'response_format' => ($eventSetting?->metadata ?? [])['sparkbooth_response_format'] ?? config('photobooth.sparkbooth.response_format', 'json'), 'metrics' => $sparkMetrics, ], diff --git a/docs/ops/photobooth/README.md b/docs/ops/photobooth/README.md index ee3cd74..4750d6a 100644 --- a/docs/ops/photobooth/README.md +++ b/docs/ops/photobooth/README.md @@ -84,7 +84,7 @@ php artisan photobooth:ingest --event=123 --max-files=20 Use this when Sparkbooth runs in “Custom Upload” mode instead of FTP. -- Endpoint: `POST /api/v1/photobooth/sparkbooth/upload` +- Endpoint: `POST /api/v1/photobooth/upload` - Auth: per-event username/password (set in Event Admin → Fotobox-Uploads; switch mode to “Sparkbooth”). - Body (multipart/form-data): `media` (file or base64), `username`, `password`, optionally `name`, `email`, `message`. - Response: @@ -99,7 +99,7 @@ Use this when Sparkbooth runs in “Custom Upload” mode instead of FTP. Example cURL (JSON response): ```bash -curl -X POST https://app.example.com/api/v1/photobooth/sparkbooth/upload \ +curl -X POST https://app.example.com/api/v1/photobooth/upload \ -F "media=@/path/to/photo.jpg" \ -F "username=PB123" \ -F "password=SECRET" \ @@ -109,7 +109,7 @@ curl -X POST https://app.example.com/api/v1/photobooth/sparkbooth/upload \ Example cURL (request XML response): ```bash -curl -X POST https://app.example.com/api/v1/photobooth/sparkbooth/upload \ +curl -X POST https://app.example.com/api/v1/photobooth/upload \ -F "media=@/path/to/photo.jpg" \ -F "username=PB123" \ -F "password=SECRET" \ diff --git a/routes/api.php b/routes/api.php index ffa82fc..37da472 100644 --- a/routes/api.php +++ b/routes/api.php @@ -153,8 +153,8 @@ Route::prefix('v1')->name('api.v1.')->group(function () { ->middleware('signed') ->name('gallery.photos.asset'); - Route::post('/photobooth/sparkbooth/upload', [SparkboothUploadController::class, 'store']) - ->name('photobooth.sparkbooth.upload'); + Route::post('/photobooth/upload', [SparkboothUploadController::class, 'store']) + ->name('photobooth.upload'); Route::post('/photobooth/connect', [PhotoboothConnectController::class, 'store']) ->middleware('throttle:photobooth-connect') ->name('photobooth.connect');