Skip to content

Commit

Permalink
nit rename var and key in json
Browse files Browse the repository at this point in the history
  • Loading branch information
dannybd committed Jan 27, 2019
1 parent 1dab47a commit 89dc106
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dyi.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

$data = array('athena' => $athena);
$data = $data + CourseRoadDB::getUserPrefs($athena);
$data['rows'] = array();
$data['roads'] = array();

$rows = CourseRoadDB::getSavedRoads($athena);
foreach ($rows as $row) {
$row['classes'] = json_decode(CourseRoadDB::decrypt($row['classes']), true);
$row['majors'] = json_decode(CourseRoadDB::decrypt($row['majors']), true);
$data['rows'][] = $row;
$roads = CourseRoadDB::getSavedRoads($athena);
foreach ($roads as $road) {
$road['classes'] = json_decode(CourseRoadDB::decrypt($road['classes']), true);
$road['majors'] = json_decode(CourseRoadDB::decrypt($road['majors']), true);
$data['roads'][] = $road;
}

echo json_encode($data);
Expand Down

0 comments on commit 89dc106

Please sign in to comment.