Remove unused variables from routes and migrations

This commit is contained in:
Chris Scott committed 2026-02-01 21:08:37 -05:00
1 parent 81e1fba687
commit 65434c166a
4 files changed
+4 -5

No files matched your search

+2 -1
View File
@@ -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: [{
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -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('')