Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chyroc committed Dec 3, 2024
1 parent 7cca2c1 commit 1bc7704
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion extensions/coze/src/services/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const replaceAPIBaseURLToPageURL = (baseURL: string): string => {
};

const initAPI = async () => {
const { api_base: baseURL, debug } = await getConfig();
const { api_base: baseURL, debug } = getConfig();
const clientId = await getClientId(baseURL);
const defaultPKCEClient = new OAuth.PKCEClient({
redirectMethod: OAuth.RedirectMethod.Web,
Expand Down
10 changes: 2 additions & 8 deletions extensions/coze/src/services/config.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import { getPreferenceValues } from "@raycast/api";

interface Preferences {
api_base: string;
debug: boolean;
}

export const getConfig = async (): Promise<Preferences> => {
const preferences = await getPreferenceValues<Preferences>();
return preferences;
export const getConfig = (): Preferences => {
return getPreferenceValues<Preferences>();
};

export const DEFAULT_CN_COZE_CLIENT_ID = "30367348905137699749500653976611.app.coze";
Expand Down

0 comments on commit 1bc7704

Please sign in to comment.