<?php

namespace App\Http\Controllers;

use App\Modules\VehiclesInVideo\Services\TokenService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class VehiclesInVideoNotificationController extends Controller
{
    public function store(Request $request, TokenService $tokenService): JsonResponse
    {
        $result = $tokenService->handleWebhook($request->all());

        return response()->json(
            ['message' => $result['message']],
            $result['status_code']
        );
    }
}
