1
0
forked from poc/pds

Updated validation functionality and failure messages in controller files

This commit is contained in:
dhanabalan
2025-07-05 18:25:11 +05:30
parent 3eb9f64fca
commit de0de426f0
7 changed files with 218 additions and 340 deletions

View File

@@ -33,11 +33,11 @@ class MachineController extends Controller
$header_auth = $request->header('Authorization');
$expectedToken = $expectedUser . ':' . $expectedPw;
if ("Bearer " . $expectedToken !== $header_auth)
if ("Bearer " . $expectedToken != $header_auth)
{
return response()->json([
'status_code' => 'ERROR',
'status_description' => 'Invalid authorization token'
'status_description' => 'Invalid authorization token!'
], 403);
}