Skip to content

Commit

Permalink
fix(greenhose-jobboard-js): correct job board entry endpoint (#7)
Browse files Browse the repository at this point in the history
* fix(greenhose-jobboard-js): correct job board entry endpoint

* add version file
  • Loading branch information
cometkim authored Oct 19, 2021
1 parent 60a2e34 commit a197f7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/swift-dots-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"greenhouse-jobboard-js": patch
"@karrotmarket/gatsby-source-greenhouse-jobboard": patch
---

Fix job board entry endpoint
4 changes: 2 additions & 2 deletions packages/greenhouse-jobboard-js/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ export class JobBoardClientV1 {
}

async getJob(jobId: Job['id']): Promise<Job & JobContentFields> {
const url = new URL(`${this.endpoint}/job/${jobId}`);
const url = new URL(`${this.endpoint}/jobs/${jobId}`);

return this.#client.get(url) as Promise<Job & JobContentFields>;
}

async getJobWithQuestions(jobId: Job['id']): Promise<Job & JobContentFields & JobQuestionFields> {
const url = new URL(`${this.endpoint}/job/${jobId}`);
const url = new URL(`${this.endpoint}/jobs/${jobId}`);
url.searchParams.set('questions', 'true');

return this.#client.get(url) as Promise<Job & JobContentFields & JobQuestionFields>;
Expand Down

0 comments on commit a197f7a

Please sign in to comment.