<?php

namespace App\Http\Controllers\Orders;

use App\Classes\Modules\Orders\ControllersLogic\ConfirmOrderLogic;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class ConfirmOrderController
{
    /**
     * @param Request $request
     * @param ConfirmOrderLogic $logic
     * @return JsonResponse
     */
    public function confirm(int $id, Request $request, ConfirmOrderLogic $logic): JsonResponse
    {
        $request->merge(['id' => $id]);
        return $logic->execute($request);
    }
}
