public function intCreateFootprints(Request $request)
{
if (!$this->ensureAuthKey($request)) {
return $this->getAuthKeyErrorResponse();
}
$response = ['success' => true, 'errors' => [], 'message' => 'Default footprints successfully created'];
try {
$this->get('partkeepr.setup.footprint_service')->importFootprints();
} catch (\Exception $e) {
$response['success'] = false;
$response['message'] = 'Footprint creation error';
$response['errors'] = [$e->getMessage()];
}
return new JsonResponse($response);
}