From 1a17948414e97f1486e023ec78240aa75c513f4b Mon Sep 17 00:00:00 2001 From: Robert DeLuca Date: Tue, 2 Jul 2019 16:41:19 -0500 Subject: [PATCH] fix: `POST` snapshots to the right endpoint In in the config refactor we're accidentally POST'ing to the health check endpoint, which 404s Will add tests in a follow up PR --- src/utils/sdk-utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/sdk-utils.ts b/src/utils/sdk-utils.ts index 3c5ff56b..eb7cda7b 100644 --- a/src/utils/sdk-utils.ts +++ b/src/utils/sdk-utils.ts @@ -1,6 +1,6 @@ import Axios from 'axios' import * as path from 'path' -import {DEFAULT_PORT, HEALTHCHECK_PATH} from '../services/agent-service-constants' +import {DEFAULT_PORT, HEALTHCHECK_PATH, SNAPSHOT_PATH} from '../services/agent-service-constants' import {logError} from './logger' export function agentJsFilename() { @@ -23,7 +23,7 @@ export async function isAgentRunning() { } export async function postSnapshot(body: any) { - const URL = `http://localhost:${DEFAULT_PORT}${HEALTHCHECK_PATH}` + const URL = `http://localhost:${DEFAULT_PORT}${SNAPSHOT_PATH}` const ONE_HUNDRED_MB_IN_BYTES = 100_000_000 return Axios({