-
Notifications
You must be signed in to change notification settings - Fork 44.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/zamilmajdy/make-api-host-configu…
…rable' into zamilmajdy/make-api-host-configurable
- Loading branch information
Showing
9 changed files
with
95 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
autogpt_platform/frontend/src/lib/marketplace-api/browser-client.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { createClient } from "../supabase/client"; | ||
import BaseMarketplaceAPI from "./base-client"; | ||
|
||
export default class ClientSideMarketplaceAPI extends BaseMarketplaceAPI { | ||
constructor( | ||
baseUrl: string = process.env.NEXT_PUBLIC_AGPT_MARKETPLACE_URL || | ||
"http://localhost:8015/api/v1/market", | ||
) { | ||
const supabaseClient = createClient(); | ||
super(baseUrl, supabaseClient); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import MarketplaceAPI from "./client"; | ||
import MarketplaceAPI from "./browser-client"; | ||
|
||
export default MarketplaceAPI; | ||
export * from "./types"; |
12 changes: 12 additions & 0 deletions
12
autogpt_platform/frontend/src/lib/marketplace-api/server-client.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { createServerClient } from "../supabase/server"; | ||
import BaseMarketplaceAPI from "./base-client"; | ||
|
||
export default class ServerSideMarketplaceAPI extends BaseMarketplaceAPI { | ||
constructor( | ||
baseUrl: string = process.env.NEXT_PUBLIC_AGPT_MARKETPLACE_URL || | ||
"http://localhost:8015/api/v1/market", | ||
) { | ||
const supabaseClient = createServerClient(); | ||
super(baseUrl, supabaseClient); | ||
} | ||
} |