From 7c12fdcb56e8c6d49731eca10e3b18b6a76b515f Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sat, 24 Dec 2016 01:04:18 -0600 Subject: [PATCH] add payload_json instead of the current iterator (#1015) --- src/client/rest/APIRequest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/rest/APIRequest.js b/src/client/rest/APIRequest.js index 40eb0aba8..36c2d8fed 100644 --- a/src/client/rest/APIRequest.js +++ b/src/client/rest/APIRequest.js @@ -37,7 +37,7 @@ class APIRequest { if (this.file && this.file.file) { apiRequest.attach('file', this.file.file, this.file.name); this.data = this.data || {}; - for (const key in this.data) if (this.data[key]) apiRequest.field(key, this.data[key]); + apiRequest.field('payload_json', JSON.stringify(this.data)); } else if (this.data) { apiRequest.send(this.data); }