mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Remove unused variables from routes and migrations
This commit is contained in:
1 parent
81e1fba687
commit
65434c166a
4 files changed
+4
-5
No files matched your search
@@ -163,7 +163,8 @@ function migrateGitTokenToCredentials(db: Database): void {
|
||||
continue
|
||||
}
|
||||
|
||||
const { gitToken: _, ...rest } = parsed
|
||||
const { gitToken: _gitToken, ...rest } = parsed
|
||||
void _gitToken
|
||||
const migrated = {
|
||||
...rest,
|
||||
gitCredentials: [{
|
||||
|
||||
@@ -201,7 +201,7 @@ try {
|
||||
logger.error('Failed to initialize workspace:', error)
|
||||
}
|
||||
|
||||
app.route('/api/auth', createAuthRoutes(auth, db))
|
||||
app.route('/api/auth', createAuthRoutes(auth))
|
||||
app.route('/api/auth-info', createAuthInfoRoutes(auth, db))
|
||||
|
||||
app.route('/api/health', createHealthRoutes(db))
|
||||
|
||||
@@ -5,7 +5,7 @@ import { ENV } from '@opencode-manager/shared/config/env'
|
||||
import { logger } from '../utils/logger'
|
||||
import { hashPassword } from 'better-auth/crypto'
|
||||
|
||||
export function createAuthRoutes(auth: AuthInstance, _db: Database) {
|
||||
export function createAuthRoutes(auth: AuthInstance): Hono {
|
||||
const app = new Hono()
|
||||
|
||||
app.all('/*', async (c) => {
|
||||
|
||||
@@ -218,12 +218,10 @@ describe('GitBranchService', () => {
|
||||
it('handles getBranchStatus failure for current branch gracefully', async () => {
|
||||
const mockRepo = { id: 1, fullPath: '/path/to/repo' }
|
||||
getRepoByIdMock.mockReturnValue(mockRepo as any)
|
||||
let revListCalls = 0
|
||||
executeCommandMock.mockImplementation((args) => {
|
||||
if (args.includes('rev-parse')) return Promise.resolve('main')
|
||||
if (args.includes('branch')) return Promise.resolve('* main abc123 Initial commit')
|
||||
if (args.includes('rev-list')) {
|
||||
revListCalls++
|
||||
return Promise.reject(new Error('No upstream'))
|
||||
}
|
||||
return Promise.resolve('')
|
||||
|
||||
Reference in new issue
Block a user