Skip to content

Commit

Permalink
fix: POST snapshots to the right endpoint (#271)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Robdel12 authored Jul 2, 2019
1 parent fff73ef commit bf8fc6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/sdk-utils.ts
Original file line number Diff line number Diff line change
@@ -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() {
Expand All @@ -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({
Expand Down

0 comments on commit bf8fc6c

Please sign in to comment.