]> source.dussan.org Git - rspamd.git/commitdiff
Closes: #2684 2685/head
authorChristian Moelders <christian.moelders@storeplus.de>
Mon, 17 Dec 2018 10:58:33 +0000 (11:58 +0100)
committerChristian Moelders <christian.moelders@storeplus.de>
Mon, 17 Dec 2018 10:58:33 +0000 (11:58 +0100)
The successful upload of a text in the learning section
is answered with HTTP status code 204, that is:
The server has successfully processed the request and
does not return any content.

For this reason  must be used.

interface/js/app/upload.js

index f5a5cf73fbb5ba854e9da6d66d11c8595887374c..466d5d25e67cdd14f37da454c610789a3fc6b8e8 100644 (file)
@@ -52,7 +52,7 @@ define(["jquery"],
                 headers: headers,
                 success: function (json) {
                     cleanTextUpload(source);
-                    if (json[0].data.success) {
+                    if (json[0].status === true) {
                         rspamd.alertMessage("alert-success", "Data successfully uploaded");
                     }
                 }