AllskyTeam / allsky-website

Web interface displaying an image from an allsky camera.
54 stars 42 forks source link

controller.js: specify json dataType #136

Closed EricClaeys closed 1 year ago

EricClaeys commented 1 year ago

If a web server doesn't return "Content-Type: application/json", the $.ajax() call treats the string as text, not json data, and fails. Explicitly define the dataType as "json".

Also, add an error() function.