@@ -5,7 +5,8 @@ import { v4 as uuidv4 } from 'uuid';
55import { getDatabase } from '../db/connection.js' ;
66import { asyncHandler , handleValidationError } from '../utils/route-helpers.js' ;
77import { logger } from '../utils/logger.js' ;
8- import { AuthRequest , requireAuth , requirePermission } from '../middleware/auth.js' ;
8+ import type { AuthRequest } from '../middleware/auth.js' ;
9+ import { requireAuth , requirePermission } from '../middleware/auth.js' ;
910
1011const router = Router ( ) ;
1112
@@ -22,14 +23,16 @@ const updateAssessorSchema = z.object({
2223} ) ;
2324
2425// GET / - List all assessors
25- router . get ( '/' , requireAuth , asyncHandler ( async ( req : AuthRequest , res : Response ) : Promise < void > => {
26+ router . get ( '/' , requireAuth , asyncHandler ( async ( _req : AuthRequest , res : Response ) : Promise < void > => {
2627 const db = getDatabase ( ) ;
2728
2829 const assessors = ( await db
2930 . selectFrom ( 'assessor' )
31+ // biome-ignore lint/suspicious/noExplicitAny: Kysely cross-table join refs require type cast
3032 . leftJoin ( 'entity' , ( join ) =>
3133 join . onRef ( 'entity.id' as any , '=' , 'assessor.entity_id' as any )
3234 )
35+ // biome-ignore lint/suspicious/noExplicitAny: Kysely cross-table join refs require type cast
3336 . leftJoin ( 'app_user' , ( join ) =>
3437 join . onRef ( 'app_user.id' as any , '=' , 'assessor.user_id' as any )
3538 )
@@ -46,7 +49,7 @@ router.get('/', requireAuth, asyncHandler(async (req: AuthRequest, res: Response
4649 'app_user.display_name as user_display_name' ,
4750 ] )
4851 . orderBy ( 'assessor.created_at' , 'desc' )
49- . execute ( ) ) as any [ ] ;
52+ . execute ( ) ) as Record < string , unknown > [ ] ;
5053
5154 res . json ( { data : assessors } ) ;
5255} ) ) ;
@@ -57,9 +60,11 @@ router.get('/:id', requireAuth, asyncHandler(async (req: AuthRequest, res: Respo
5760
5861 const assessor = await db
5962 . selectFrom ( 'assessor' )
63+ // biome-ignore lint/suspicious/noExplicitAny: Kysely cross-table join refs require type cast
6064 . leftJoin ( 'entity' , ( join ) =>
6165 join . onRef ( 'entity.id' as any , '=' , 'assessor.entity_id' as any )
6266 )
67+ // biome-ignore lint/suspicious/noExplicitAny: Kysely cross-table join refs require type cast
6368 . leftJoin ( 'app_user' , ( join ) =>
6469 join . onRef ( 'app_user.id' as any , '=' , 'assessor.user_id' as any )
6570 )
@@ -86,6 +91,7 @@ router.get('/:id', requireAuth, asyncHandler(async (req: AuthRequest, res: Respo
8691 // Get attestations by this assessor
8792 const attestations = ( await db
8893 . selectFrom ( 'attestation' )
94+ // biome-ignore lint/suspicious/noExplicitAny: Kysely cross-table join refs require type cast
8995 . leftJoin ( 'assessment' , ( join ) =>
9096 join . onRef ( 'assessment.id' as any , '=' , 'attestation.assessment_id' as any )
9197 )
@@ -98,7 +104,7 @@ router.get('/:id', requireAuth, asyncHandler(async (req: AuthRequest, res: Respo
98104 'assessment.id as assessment_id' ,
99105 ] )
100106 . orderBy ( 'attestation.created_at' , 'desc' )
101- . execute ( ) ) as any [ ] ;
107+ . execute ( ) ) as Record < string , unknown > [ ] ;
102108
103109 res . json ( { ...assessor , attestations } ) ;
104110} ) ) ;
@@ -154,7 +160,7 @@ router.put(
154160 return ;
155161 }
156162
157- const updateData : any = { updated_at : new Date ( ) } ;
163+ const updateData : Record < string , unknown > = { updated_at : new Date ( ) } ;
158164 if ( data . thirdParty !== undefined ) updateData . third_party = data . thirdParty ;
159165 if ( data . entityId !== undefined ) updateData . entity_id = data . entityId ;
160166 if ( data . userId !== undefined ) updateData . user_id = data . userId ;
0 commit comments