Skip to content

Commit

Permalink
Support endpoint paths in data collector goff-api.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
crprice authored Jan 16, 2025
1 parent 62da1cb commit 956b86d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export class GoffApiController {

const request: DataCollectorRequest<boolean> = { events: events, meta: dataCollectorMetadata };
const endpointURL = new URL(this.endpoint);
endpointURL.pathname = 'v1/data/collector';
const dataCollectorPath = 'v1/data/collector';
endpointURL.pathname = endpointURL.pathname.endsWith('/')
? endpointURL.pathname + dataCollectorPath
: endpointURL.pathname + '/' + dataCollectorPath;

try {
const headers: HeadersInit = {
Expand Down

0 comments on commit 956b86d

Please sign in to comment.