From d3f23db049dfe4846982825d3e0bfce7ab385a85 Mon Sep 17 00:00:00 2001 From: sachaaaaa Date: Mon, 18 Feb 2019 13:17:58 +1100 Subject: [PATCH] serialise objects to json before node-fetch --- js/modules/loki_message_api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/modules/loki_message_api.js b/js/modules/loki_message_api.js index 1a169695c..8aa1a387d 100644 --- a/js/modules/loki_message_api.js +++ b/js/modules/loki_message_api.js @@ -131,7 +131,7 @@ class LokiMessageAPI { }; const fetchOptions = { method: 'POST', - body, + body: JSON.stringify(body), headers: { 'X-Loki-EphemKey': 'not implemented yet', }, @@ -228,7 +228,7 @@ class LokiMessageAPI { }; const fetchOptions = { method: 'POST', - body, + body: JSON.stringify(body), headers, }; try {