Add support for custom genders (#879)

This commit is contained in:
Régis Freyd
2018-02-04 15:44:26 -05:00
committed by GitHub
parent 94cec0daff
commit e78e140b9e
79 changed files with 6897 additions and 980 deletions
@@ -68,7 +68,7 @@ class PersonalizationController extends Controller
->where('id', $contactFieldTypeId)
->firstOrFail();
} catch (ModelNotFoundException $e) {
return $this->respond([
return response()->json([
'errors' => [
'message' => trans('app.error_unauthorized'),
],
@@ -94,6 +94,9 @@ class PersonalizationController extends Controller
return $contactFieldType;
}
/**
* Destroy the contact field type.
*/
public function destroyContactFieldType(Request $request, $contactFieldTypeId)
{
try {
@@ -101,7 +104,7 @@ class PersonalizationController extends Controller
->where('id', $contactFieldTypeId)
->firstOrFail();
} catch (ModelNotFoundException $e) {
return $this->respond([
return response()->json([
'errors' => [
'message' => trans('app.error_unauthorized'),
],
@@ -109,7 +112,7 @@ class PersonalizationController extends Controller
}
if ($contactFieldType->delible == false) {
return $this->respond([
return response()->json([
'errors' => [
'message' => trans('app.error_unauthorized'),
],