Skip to content
Snippets Groups Projects
Verified Commit 49528040 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Fixed status code handling

parent 9219b114
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ function submit () {
var json = JSON.parse(XHR.responseText);
document.getElementById('form-error').innerHTML = 'Error: ' + json.error
document.getElementById('form-error').classList.remove('hidden')
} else if (XHR.readyState === 4 && (XHR.status === 200 || XHR.status === 204)) {
} else if (XHR.readyState === 4 && (XHR.status === 201 || XHR.status === 204)) {
document.getElementById('form-success').innerHTML = 'Success: domain ' + payload.name + ' was submitted successfully :)'
document.getElementById('form-success').classList.remove('hidden')
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment