Skip to content

Commit

Permalink
Updated conference model and controller
Browse files Browse the repository at this point in the history
  • Loading branch information
JennaCPC committed Oct 6, 2022
1 parent c31fec6 commit 2e9ba11
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
24 changes: 22 additions & 2 deletions api/controller/conferenceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,22 @@ public function findConferenceByTitle()
);
}

public function findConferenceByTimeStamp()
public function findConferenceByStartTimestamp()
{
ControllerValidator::ValidateRequest(
$this->methodClass,
$_SERVER['REQUEST_METHOD'],
'getConferenceByTimeStamp',
'getConferenceByStartTimestamp',
'timestamp'
);
}

public function findConferenceByEndTimestamp()
{
ControllerValidator::ValidateRequest(
$this->methodClass,
$_SERVER['REQUEST_METHOD'],
'getConferenceByEndTimestamp',
'timestamp'
);
}
Expand All @@ -57,6 +67,16 @@ public function findConferenceByLocation()
);
}

public function findConferenceByStatus()
{
ControllerValidator::ValidateRequest(
$this->methodClass,
$_SERVER['REQUEST_METHOD'],
'getConferenceByStatus',
'status'
);
}

/* POST IMPLEMENTATION */
public function createConference()
{
Expand Down
14 changes: 12 additions & 2 deletions api/model/conferenceModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,26 @@ public function getConferenceByTitle($cTitle)
return Model::GET($this->tableName, 'ConferenceTitle', $cTitle);
}

public function getConferenceByTimeStamp($cTimeStamp)
public function getConferenceByStartTimestamp($cTimeStamp)
{
return Model::GET($this->tableName, 'ConferenceTimestamp', $cTimeStamp);
return Model::GET($this->tableName, 'ConferenceStartTimestamp', $cTimeStamp);
}

public function getConferenceByEndTimestamp($cTimeStamp)
{
return Model::GET($this->tableName, 'ConferenceEndTimestamp', $cTimeStamp);
}

public function getConferenceByLocation($cLocation)
{
return Model::GET($this->tableName, 'ConferenceLocation', $cLocation);
}

public function getConferenceByStatus($cStatus)
{
return Model::GET($this->tableName, 'ConferenceStatus', $cStatus);
}

/* POST IMPLEMENTATION */
public function postNewConference()
{
Expand Down

0 comments on commit 2e9ba11

Please sign in to comment.