add payload_json instead of the current iterator (#1015)

This commit is contained in:
Gus Caplan
2016-12-24 01:04:18 -06:00
committed by Schuyler Cebulskie
parent 28ca83011c
commit 7c12fdcb56

View File

@@ -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);
}