/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/server/src/handlers/credential.ts
22 строки
778 B
Dax
refactor(core): derive catalog availability from integrations (#32272)
14 июн 2026, 15:44
Не верифицирован
14 июн 2026, 15:44
0cf3ee4
Код
Авторство
О чём код?
import { Integration } from "@opencode-ai/core/integration" import { Effect } from "effect" import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi" import { Api } from "../api" export const CredentialHandler = HttpApiBuilder.group(Api, "server.credential", (handlers) => handlers .handle( "credential.update", Effect.fn(function* (ctx) { yield* (yield* Integration.Service).connection.update(ctx.params.credentialID, { label: ctx.payload.label }) return HttpApiSchema.NoContent.make() }), ) .handle( "credential.remove", Effect.fn(function* (ctx) { yield* (yield* Integration.Service).connection.remove(ctx.params.credentialID) return HttpApiSchema.NoContent.make() }), ), )