mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
fix(frontend): list provider integrations in settings
This commit is contained in:
1 parent
c8647c1eec
commit
024b3d969f
9 files changed
+211
-46
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { API_BASE_URL } from "@/config"
|
||||
import type { FormAnswer, IntegrationMethod } from "@opencode-manager/shared/opencode"
|
||||
import type { FormAnswer, IntegrationInfo, IntegrationMethod } from "@opencode-manager/shared/opencode"
|
||||
import type { OAuthAttemptStatus, OAuthAuthorizeResponse } from "@opencode-manager/shared/schemas"
|
||||
import { fetchWrapper, fetchWrapperVoid } from "./fetchWrapper"
|
||||
|
||||
@@ -7,6 +7,7 @@ export type {
|
||||
FormAnswer,
|
||||
FormField,
|
||||
FormValue,
|
||||
IntegrationInfo,
|
||||
IntegrationKeyMethod,
|
||||
IntegrationMethod,
|
||||
IntegrationOAuthMethod,
|
||||
@@ -45,4 +46,11 @@ export const oauthApi = {
|
||||
)
|
||||
return providers
|
||||
},
|
||||
|
||||
getIntegrations: async (): Promise<IntegrationInfo[]> => {
|
||||
const { integrations } = await fetchWrapper<{ integrations: IntegrationInfo[] }>(
|
||||
`${API_BASE_URL}/api/oauth/integrations`
|
||||
)
|
||||
return integrations
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user