1const accessStudentDashboard = (uri = '') => getBearerToken(uri); 2// Original method was called getBearerToken - Renamed but kept original as to not break anything 3 4const getBearerToken = (uri = '') => { 5 $('#studentDashboardLink').text("Loading...") 6 7 url = "/auth/dashboard"; 8 9 if (uri !== '') { 10 url += '?uri=' + uri; 11 } 12 13 $.ajax({ 14 url: url, 15 method: "POST", 16 }) 17 .done((response) => { 18 if (response.url) { 19 location.href = response.url; 20 $('#studentDashboardLink').text("Student Dashboard") 21 } else { 22 $('#studentDashboardLink').text("Student Dashboard") 23 if (response.error && typeof response.message === "string") { 24 alert(response.message); 25 } else { 26 alert("Could not be redirected at this time, please try again later.") 27 } 28 } 29 }).fail(() => { 30 $('#studentDashboardLink').text("Student Dashboard") 31 alert("Network error, please try again later.") 32 }) 33}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.