Skip to content

Commit

Permalink
fix: use camel case route. (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoseley authored Sep 12, 2024
1 parent 785fcf5 commit a127549
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions src/content.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Cortex } from "./cortex";
import { CortexApiClient } from "./api-client";
import { Readable } from "stream";
import { CortexApiClient } from "./api-client";
import { Cortex } from "./cortex";
import { processStream } from "./utils/streaming";

export type ContentCommandType =
Expand Down Expand Up @@ -432,9 +432,7 @@ export class Content {
}

async getPublishTargets() {
const res = await this.apiClient.GET(
`/content/${this._id}/publish-targets`,
);
const res = await this.apiClient.GET(`/content/${this._id}/publishTargets`);

if (res.status !== 200) {
throw new Error(
Expand Down
8 changes: 4 additions & 4 deletions src/org.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class OrgConfig {
}

static async get(client: CortexApiClient): Promise<OrgConfig> {
const res = await client.GET("/org-config");
const res = await client.GET("/orgConfig");
if (res.status !== 200) {
throw new Error(`Failed to configure cortex: ${res.statusText}`);
}
Expand All @@ -50,12 +50,12 @@ export class OrgConfig {
client: CortexApiClient,
config: OrgConfigOpts,
): Promise<OrgConfig> {
const getRes = await client.GET("/org-config");
const getRes = await client.GET("/orgConfig");
let res: Response;
if (getRes.status !== 200) {
res = await client.POST("/org-config", config);
res = await client.POST("/orgConfig", config);
} else {
res = await client.PUT("/org-config", config);
res = await client.PUT("/orgConfig", config);
}

if (res.status > 201) {
Expand Down

0 comments on commit a127549

Please sign in to comment.