Make sure values from api are correct

[MAILPOET-2453]
This commit is contained in:
Pavel Dohnal
2019-12-16 15:15:30 +01:00
committed by Rostislav Wolný
parent 05b93da9b2
commit 185566460b
3 changed files with 6 additions and 4 deletions

View File

@@ -45,7 +45,9 @@ class CustomFields extends APIEndpoint {
}
$custom_field = CustomField::findOne($custom_field->id);
if(!$custom_field instanceof CustomField) return $this->errorResponse();
return $this->successResponse($custom_field->asArray());
$response = $custom_field->asArray();
$response['id'] = (int)$response['id'];
return $this->successResponse($response);
}
function get($data = []) {