Remove unused test method and its associated code from ObdController

This commit is contained in:
dhanabalan
2025-10-13 15:57:18 +05:30
parent 4ed84d3053
commit d79c7101b4

View File

@@ -420,37 +420,6 @@ class ObdController extends Controller
} }
} }
//Route::post('obd/store-test-data', [ObdController::class, 'test'])
public function test(Request $request)
{
$expectedUser = env('API_AUTH_USER');
$expectedPw = env('API_AUTH_PW');
$header_auth = $request->header('Authorization');
$expectedToken = $expectedUser . ':' . $expectedPw;
// if("Bearer " . $expectedToken != $header_auth)
// {
// return response("ERROR: Unauthorized", 403)
// ->header('Content-Type', 'text/plain');
// }
try
{
return response("Successfully Received", 200)->header('Content-Type', 'text/plain');
}
catch (\Exception $e)
{
//response("ERROR: Server error", 500)->header('Content-Type', 'text/plain');
return response()->json([
'status_code' => 'ERROR',
'status_description' => 'Test internal server error : '.$e?->getCode()
], 500);
}
}
public function get_obd(Request $request) public function get_obd(Request $request)
{ {
$expectedUser = env('API_AUTH_USER'); $expectedUser = env('API_AUTH_USER');