1
0
forked from poc/pds

Added proper status code for all the api modules

This commit is contained in:
dhanabalan
2025-07-11 16:01:37 +05:30
parent b153a53f4b
commit 484bc6d070
6 changed files with 15 additions and 15 deletions

View File

@@ -38,7 +38,7 @@ class ModulePlantController extends Controller
return response()->json([
'status_code' => 'ERROR',
'status_description' => "Plant Name can't be empty!"
], 400);
], 404);
}
$headerValue = $request->header('plant-name');
@@ -47,7 +47,7 @@ class ModulePlantController extends Controller
return response()->json([
'status_code' => 'ERROR',
'status_description' => "Invalid value for 'plant-name' header!"
], 400);
], 404);
}
$plantNames = Plant::orderBy('created_at', 'asc')
@@ -57,7 +57,7 @@ class ModulePlantController extends Controller
return response()->json([
'status_code' => 'SUCCESS',
'status_description' => $plantNames
]);
], 200);
}
/**