@ -4,7 +4,7 @@ const nodeFetch = require('node-fetch');
const { parse } = require('url');
const LOKI_EPHEMKEY_HEADER = 'X-Loki-EphemKey';
const endpointBase = '/v1/storage_rpc';
const endpointBase = '/storage_rpc/v1';
const decryptResponse = async (response, address) => {
try {
@ -50,7 +50,7 @@ class LocalLokiServer extends EventEmitter {
}
// Check endpoints here
if (req.url === '/v1/storage_rpc') {
if (req.url === '/storage_rpc/v1') {
const bodyObject = JSON.parse(body);
if (bodyObject.method !== 'store') {
@ -74,7 +74,7 @@ describe('LocalLokiServer', () => {
});
await axios.post('http://localhost:8001/v1/storage_rpc', messageData);
await axios.post('http://localhost:8001/storage_rpc/v1', messageData);
} catch (error) {
assert.isNotOk(error, 'Error occured');