Skip to content

Commit

Permalink
make version check a switch
Browse files Browse the repository at this point in the history
  • Loading branch information
driusan committed Aug 8, 2023
1 parent c6409d2 commit cf5fc3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/api/php/views/project.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ class Project
'Instruments' => array_keys(\Utility::getAllInstruments()),
'Visits' => $this->_getVisits(),
];
if ($this->apiversion == 'v0.0.4-dev') {
switch($this->apiversion) {
case 'v0.0.3':
return $obj;
default:
// >= v0.0.4
$obj['Cohorts'] = array_map(
function ($cohort) {
return $cohort['title'];
Expand Down

0 comments on commit cf5fc3d

Please sign in to comment.