mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 16:32:20 +00:00
- Method getCheckBewerbung implemented with new standard
- Added new permission in fhcomplete.php config file
This commit is contained in:
@@ -93,43 +93,21 @@ class Person extends APIv1_Controller
|
||||
*/
|
||||
public function getCheckBewerbung()
|
||||
{
|
||||
$result = $this->PersonModel->checkBewerbung($this->get("email"), $this->get("studiensemester_kurzbz"));
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
$payload = [
|
||||
'success' => true,
|
||||
'message' => 'Bewerbung exists.'
|
||||
];
|
||||
$payload['data'] = $result;
|
||||
$this->response($payload, $httpstatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getCheckZugangscodePerson()
|
||||
{
|
||||
$result = $this->PersonModel->checkZugangscodePerson($this->get("code"));
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
if(!empty($result))
|
||||
$email = $this->get('email');
|
||||
$studiensemester_kurzbz = $this->get('studiensemester_kurzbz');
|
||||
|
||||
if(isset($email))
|
||||
{
|
||||
$payload = [
|
||||
'success' => true,
|
||||
'message' => 'Zugangscode exists.'
|
||||
];
|
||||
$payload['data'] = $result;
|
||||
$result = $this->PersonModel->checkBewerbung($email, $studiensemester_kurzbz);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$payload = [
|
||||
'success' => false,
|
||||
'message' => 'Zugangscode does not exist.'
|
||||
];
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
$this->response();
|
||||
}
|
||||
|
||||
$this->response($payload, $httpstatus);
|
||||
}
|
||||
|
||||
|
||||
private function _validate($person = NULL)
|
||||
{
|
||||
if(!isset($person))
|
||||
|
||||
Reference in New Issue
Block a user