From 77208ac7e4404bff60be8d2827f2bd1534da7634 Mon Sep 17 00:00:00 2001 From: luciano_assefh Date: Thu, 27 Feb 2025 15:44:53 -0300 Subject: [PATCH] #WN-213# BulkUpload Import --- app/Http/Controllers/WhatNowController.php | 33 +++++++++++----------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/app/Http/Controllers/WhatNowController.php b/app/Http/Controllers/WhatNowController.php index c42ad70..4ec980e 100644 --- a/app/Http/Controllers/WhatNowController.php +++ b/app/Http/Controllers/WhatNowController.php @@ -421,22 +421,22 @@ public function putById($id) ]); } - // try { - // $this->validate($this->request, [ - // 'countryCode' => 'alpha|size:3', - // 'eventType' => 'string|max:50', - // 'regionName' => 'nullable|string', - // 'translations' => 'array', - // 'translations.*.webUrl' => 'nullable|string', - // 'translations.*.lang' => 'alpha|size:2', - // 'translations.*.title' => 'string', - // 'translations.*.description' => 'string', - // ]); - // } catch (ValidationException $e) { - // Log::info($e->getMessage()); - - // return $e->getResponse(); - // } + try { + $this->validate($this->request, [ + 'countryCode' => 'alpha|size:3', + 'eventType' => 'string|max:50', + 'regionName' => 'nullable|string', + 'translations' => 'array', + 'translations.*.webUrl' => 'nullable|string', + 'translations.*.lang' => 'alpha|size:2', + 'translations.*.title' => 'string', + 'translations.*.description' => 'string', + ]); + } catch (ValidationException $e) { + Log::info($e->getMessage()); + + return $e->getResponse(); + } try { $org = $this->orgRepo->findByCountryCode($this->request->input('countryCode')); @@ -478,7 +478,6 @@ public function putById($id) return response()->json([ 'status' => 500, 'error_message' => $e->getMessage(), -// 'error_message' => 'Unable to update item', 'errors' => ['Error updating item'], ], 500); }