fixed departments

This commit is contained in:
sghsri
2021-10-17 15:19:58 -05:00
parent cd94422cac
commit f4aebd4050

View File

@@ -205,15 +205,9 @@ function getCurrentSemesters() {
// use the utexas review api for getting the list of departments
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) {
let { majors } = 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;
departments = JSON.parse(response);
}
});
}