fixed departments
This commit is contained in:
@@ -205,15 +205,9 @@ function getCurrentSemesters() {
|
|||||||
|
|
||||||
// use the utexas review api for getting the list of departments
|
// use the utexas review api for getting the list of departments
|
||||||
function getCurrentDepartments() {
|
function getCurrentDepartments() {
|
||||||
$.get("https://www.utexasreview.com/api/get_major", function (response) {
|
$.get("https://raw.githubusercontent.com/sghsri/UT-Registration-Plus/master/docs/departments.json", function (response) {
|
||||||
if (response) {
|
if (response) {
|
||||||
let { majors } = response;
|
departments = JSON.parse(response);
|
||||||
let indices = Object.keys(majors);
|
|
||||||
let new_departments = [];
|
|
||||||
for (let i = 0; i < indices.length; i++) {
|
|
||||||
new_departments.push(majors[i].abr);
|
|
||||||
}
|
|
||||||
departments = new_departments;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user