mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Comment UV API and fix little bugs
This commit is contained in:
@ -52,7 +52,11 @@
|
||||
year--
|
||||
}
|
||||
const url = "{{ url('api:uv_endpoint') }}?year=" + year + "&code=" + codeInput.value
|
||||
$.getJSON(url, function(data) {
|
||||
$.getJSON(url, function(data, _, xhr) {
|
||||
if (xhr.status != 200) {
|
||||
alert('{% trans %}Unknown UV code{% endtrans %}')
|
||||
return
|
||||
}
|
||||
for (let key in data) {
|
||||
if (data.hasOwnProperty(key)) {
|
||||
const el = document.querySelector('[name="' + key + '"]')
|
||||
|
Reference in New Issue
Block a user