add test batches
This commit is contained in:
@@ -42,7 +42,7 @@ class LateSlipLogsController extends BaseApiController
|
||||
public function show(int $id): JsonResponse
|
||||
{
|
||||
$log = $this->queryService->find($id);
|
||||
if (! $log) {
|
||||
if (!$log) {
|
||||
return $this->error('Late slip log not found.', Response::HTTP_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class LateSlipLogsController extends BaseApiController
|
||||
public function destroy(int $id): JsonResponse
|
||||
{
|
||||
$log = $this->queryService->find($id);
|
||||
if (! $log) {
|
||||
if (!$log) {
|
||||
return $this->error('Late slip log not found.', Response::HTTP_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -65,12 +65,11 @@ class LateSlipLogsController extends BaseApiController
|
||||
try {
|
||||
$deleted = $this->commandService->delete($log);
|
||||
} catch (\Throwable $e) {
|
||||
Log::error('Late slip log delete failed: '.$e->getMessage());
|
||||
|
||||
Log::error('Late slip log delete failed: ' . $e->getMessage());
|
||||
return $this->error('Unable to delete late slip log.', Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
if (! $deleted) {
|
||||
if (!$deleted) {
|
||||
return $this->error('Unable to delete late slip log.', Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user