Fix some responses to be more appropriate

Error/success was mixed up
This commit is contained in:
Scarzy 2024-05-01 18:56:49 +01:00
parent 516f766a44
commit e817b20840

View file

@ -178,13 +178,12 @@ class AssetFilesController extends Controller
} }
$log->delete(); $log->delete();
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.deletefile.success')), 200); return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/hardware/message.deletefile.success')), 200);
} }
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.deletefile.success')), 200); return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.deletefile.error')), 500);
} }
// Redirect to the hardware management page
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.deletefile.error')), 500); return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.deletefile.error')), 500);
} }
} }