Fixing style errors.
This commit is contained in:
parent
eb529a660d
commit
f4f7a360a1
@ -377,27 +377,27 @@ class Recruitment extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @url POST candidature/
|
* @url POST candidature/
|
||||||
*/
|
*/
|
||||||
public function postCandidature($request_data = null)
|
public function postCandidature($request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->write) {
|
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->write) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check mandatory fields
|
// Check mandatory fields
|
||||||
$result = $this->_validate($request_data);
|
$result = $this->_validate($request_data);
|
||||||
|
|
||||||
foreach ($request_data as $field => $value) {
|
foreach ($request_data as $field => $value) {
|
||||||
$this->jobposition->$field = $this->_checkValForAPI($field, $value, $this->jobposition);
|
$this->jobposition->$field = $this->_checkValForAPI($field, $value, $this->jobposition);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean data
|
// Clean data
|
||||||
// $this->jobposition->abc = checkVal($this->jobposition->abc, 'alphanohtml');
|
// $this->jobposition->abc = checkVal($this->jobposition->abc, 'alphanohtml');
|
||||||
|
|
||||||
if ($this->candidature->create(DolibarrApiAccess::$user)<0) {
|
if ($this->candidature->create(DolibarrApiAccess::$user)<0) {
|
||||||
throw new RestException(500, "Error creating candidature", array_merge(array($this->candidature->error), $this->candidature->errors));
|
throw new RestException(500, "Error creating candidature", array_merge(array($this->candidature->error), $this->candidature->errors));
|
||||||
}
|
}
|
||||||
return $this->candidature->id;
|
return $this->candidature->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update jobposition
|
* Update jobposition
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user