Selaa lähdekoodia

catch 417 in request.js

version-14
Rushabh Mehta 11 vuotta sitten
vanhempi
commit
a409a82f7e
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. +6
    -2
      frappe/public/js/frappe/request.js

+ 6
- 2
frappe/public/js/frappe/request.js Näytä tiedosto

@@ -50,15 +50,19 @@ frappe.request.call = function(opts) {
type: 'POST',
dataType: opts.dataType || 'json',
statusCode: {
200: function(data, xhr) {
if(typeof data === "string") data = JSON.parse(data);
opts.success && opts.success(data, xhr.responseText);
},
404: function(xhr) {
msgprint(__("Not found"));
},
403: function(xhr) {
msgprint(__("Not permitted"));
},
200: function(data, xhr) {
417: function(data, xhr) {
if(typeof data === "string") data = JSON.parse(data);
opts.success && opts.success(data, xhr.responseText);
opts.error && opts.error(data, xhr.responseText)
},
501: function(data, xhr) {
if(typeof data === "string") data = JSON.parse(data);


Ladataan…
Peruuta
Tallenna