Skip to content

Commit 8c2b732

Browse files
authored
Merge pull request #17 from IFRCGo/feature/WN-213
Feature/wn 213
2 parents 6a6a43c + 327606a commit 8c2b732

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

app/Http/Controllers/WhatNowController.php

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -421,22 +421,22 @@ public function putById($id)
421421
]);
422422
}
423423

424-
// try {
425-
// $this->validate($this->request, [
426-
// 'countryCode' => 'alpha|size:3',
427-
// 'eventType' => 'string|max:50',
428-
// 'regionName' => 'nullable|string',
429-
// 'translations' => 'array',
430-
// 'translations.*.webUrl' => 'nullable|string',
431-
// 'translations.*.lang' => 'alpha|size:2',
432-
// 'translations.*.title' => 'string',
433-
// 'translations.*.description' => 'string',
434-
// ]);
435-
// } catch (ValidationException $e) {
436-
// Log::info($e->getMessage());
437-
438-
// return $e->getResponse();
439-
// }
424+
try {
425+
$this->validate($this->request, [
426+
'countryCode' => 'alpha|size:3',
427+
'eventType' => 'string|max:50',
428+
'regionName' => 'nullable|string',
429+
'translations' => 'array',
430+
'translations.*.webUrl' => 'nullable|string',
431+
'translations.*.lang' => 'alpha|size:2',
432+
'translations.*.title' => 'string',
433+
'translations.*.description' => 'string',
434+
]);
435+
} catch (ValidationException $e) {
436+
Log::info($e->getMessage());
437+
438+
return $e->getResponse();
439+
}
440440

441441
try {
442442
$org = $this->orgRepo->findByCountryCode($this->request->input('countryCode'));
@@ -478,7 +478,6 @@ public function putById($id)
478478
return response()->json([
479479
'status' => 500,
480480
'error_message' => $e->getMessage(),
481-
// 'error_message' => 'Unable to update item',
482481
'errors' => ['Error updating item'],
483482
], 500);
484483
}

0 commit comments

Comments
 (0)