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 ModuleChartController extends Controller
return response()->json([
'status_code' => 'ERROR',
'status_description' => "Module Name can't be empty!"
], 400);
], 404);
}
$exists = ModuleList::where('module_name', $moduleName)->exists();
@@ -62,10 +62,10 @@ class ModuleChartController extends Controller
->values(); // reset array keys
return response()->json([
return response()->json([
'status_code' => 'SUCCESS',
'status_description' => $dashboardNames
]);
], 200);
}