pull/988/head
Ryan Tharp 5 years ago
parent e66e30bb0b
commit 8d4be4cb0b

@ -243,9 +243,8 @@ const serverRequest = async (endpoint, options = {}) => {
) { ) {
mode = 'sendToProxy'; mode = 'sendToProxy';
// strip trailing slash // strip trailing slash
const endpointWithQS = ( const search = url.search ? `?${url.search}` : '';
url.pathname + (url.search ? '?' + url.search : '') const endpointWithQS = `${url.pathname}${search}`.replace(/^\//, '');
).replace(/^\//, '');
// log.info('endpointWithQS', endpointWithQS) // log.info('endpointWithQS', endpointWithQS)
({ response, txtResponse, result } = await sendToProxy( ({ response, txtResponse, result } = await sendToProxy(
srvPubKey, srvPubKey,
@ -691,7 +690,8 @@ class LokiAppDotNetServerAPI {
} }
// make a request to the server // make a request to the server
async serverRequest(endpoint, options = {}) { async serverRequest(endpoint, pOptions = {}) {
const options = pOptions;
options.token = this.token; options.token = this.token;
options.srvPubKey = this.pubKey; options.srvPubKey = this.pubKey;
if (options.forceFreshToken) { if (options.forceFreshToken) {

Loading…
Cancel
Save