From 8d4be4cb0b4e69da9c2b9e79dd0865170fed0145 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Wed, 18 Mar 2020 17:52:25 -0700 Subject: [PATCH] lint --- js/modules/loki_app_dot_net_api.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/modules/loki_app_dot_net_api.js b/js/modules/loki_app_dot_net_api.js index d26ec16b3..2f70a9a64 100644 --- a/js/modules/loki_app_dot_net_api.js +++ b/js/modules/loki_app_dot_net_api.js @@ -243,9 +243,8 @@ const serverRequest = async (endpoint, options = {}) => { ) { mode = 'sendToProxy'; // strip trailing slash - const endpointWithQS = ( - url.pathname + (url.search ? '?' + url.search : '') - ).replace(/^\//, ''); + const search = url.search ? `?${url.search}` : ''; + const endpointWithQS = `${url.pathname}${search}`.replace(/^\//, ''); // log.info('endpointWithQS', endpointWithQS) ({ response, txtResponse, result } = await sendToProxy( srvPubKey, @@ -691,7 +690,8 @@ class LokiAppDotNetServerAPI { } // make a request to the server - async serverRequest(endpoint, options = {}) { + async serverRequest(endpoint, pOptions = {}) { + const options = pOptions; options.token = this.token; options.srvPubKey = this.pubKey; if (options.forceFreshToken) {