fix: complete InvesteMoz validation and error corrections
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\SectorReconciliationExecution;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
final class SectorReconciliationController extends Controller
|
||||
{
|
||||
public function preview(Request $request, SectorReconciliationExecution $execution)
|
||||
public function preview(Request $request, SectorReconciliationExecution $execution): JsonResponse|Response
|
||||
{
|
||||
$plan = $execution->preview($request);
|
||||
|
||||
return $request->expectsJson() ? response()->json($plan)->header('Cache-Control', 'private, no-store')
|
||||
: response()->view('management.sector-reconciliation', ['plan' => $plan, 'operationKey' => (string)Str::uuid()])->header('Cache-Control', 'private, no-store');
|
||||
: response()->view('management.sector-reconciliation', ['plan' => $plan, 'operationKey' => (string) Str::uuid()])->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
|
||||
public function apply(Request $request, SectorReconciliationExecution $execution)
|
||||
public function apply(Request $request, SectorReconciliationExecution $execution): JsonResponse
|
||||
{
|
||||
return response()->json($execution->apply($request))->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user