pull/3/head
Rustem 2025-02-08 17:12:54 +05:00
parent 28e9dc6366
commit 05a3f8eeb1
1 changed files with 10 additions and 2 deletions

View File

@ -27,6 +27,9 @@ class Sync1cApiController extends Controller
public function syncAutoData(Request $request)
{
try {
Log::error('Запрос машин пришел');
DB::beginTransaction();
$segments = Segment::listActive();
@ -93,8 +96,7 @@ class Sync1cApiController extends Controller
Log::error('Error processing data', [
'message' => $e->getMessage(),
'line' => $e->getLine(),
'file' => $e->getFile(),
'value' => $value,
'file' => $e->getFile()
]);
return response()->json(['error' => 'Failed to synchronize data'], 500);
}
@ -102,6 +104,9 @@ class Sync1cApiController extends Controller
public function syncOwners(Request $request)
{
try {
Log::error('Запрос владельцев пришел');
DB::beginTransaction();
Storage::disk('local')->put('last_req_owners.json', json_encode($request->json()->all(), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
@ -162,6 +167,9 @@ class Sync1cApiController extends Controller
public function syncOwnerContracts(Request $request)
{
try {
Log::error('Запрос контрактов пришел');
DB::beginTransaction();
Storage::disk('local')->put('last_req_contracts.json', json_encode($request->json()->all(), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));