mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
16 lines
420 B
TypeScript
16 lines
420 B
TypeScript
import { Hono } from 'hono'
|
|
import type { Database } from 'bun:sqlite'
|
|
import { CredentialProvider } from '../../services/credential-provider'
|
|
|
|
export function createInternalGitCredentialsRoutes(db: Database) {
|
|
const app = new Hono()
|
|
|
|
app.get('/gh-env', (c) => {
|
|
const provider = new CredentialProvider(db)
|
|
const cwd = c.req.query('cwd')
|
|
return c.json(provider.getGhCliEnv({ cwd }))
|
|
})
|
|
|
|
return app
|
|
}
|