From d0191ca7d6a3d7cadf0d6ec7ecc10f538594070c Mon Sep 17 00:00:00 2001 From: georgelima Date: Mon, 4 Feb 2019 22:30:46 -0200 Subject: [PATCH] type(rpc): add missing --- services/api.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/api.js b/services/api.js index 17b56e6..4f9cc44 100644 --- a/services/api.js +++ b/services/api.js @@ -20,6 +20,7 @@ const client = got.extend({ auth: `${RPC.user}:${RPC.password}`, }); +// $FlowFixMe const api: APIMethods = METHODS.reduce( (obj, method) => ({ ...obj, @@ -33,9 +34,7 @@ const api: APIMethods = METHODS.reduce( }, }) .then(data => Promise.resolve(data.body && data.body.result)) - .catch(payload => Promise.reject( - new Error(payload.body?.error.message || 'Something went wrong'), - )), + .catch(payload => Promise.reject(new Error(payload.body?.error.message || 'Something went wrong'))), }), {}, );