@@ -8,19 +8,19 @@ import { BaseOperationHandler } from './base';
88export class UpdateOperationHandler < Schema extends SchemaDef > extends BaseOperationHandler < Schema > {
99 async handle ( operation : 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' , args : unknown ) {
1010 // normalize args to strip `undefined` fields
11- const normalizeArgs = this . normalizeArgs ( args ) ;
11+ const normalizedArgs = this . normalizeArgs ( args ) ;
1212
1313 return match ( operation )
14- . with ( 'update' , ( ) => this . runUpdate ( this . inputValidator . validateUpdateArgs ( this . model , normalizeArgs ) ) )
14+ . with ( 'update' , ( ) => this . runUpdate ( this . inputValidator . validateUpdateArgs ( this . model , normalizedArgs ) ) )
1515 . with ( 'updateMany' , ( ) =>
16- this . runUpdateMany ( this . inputValidator . validateUpdateManyArgs ( this . model , normalizeArgs ) ) ,
16+ this . runUpdateMany ( this . inputValidator . validateUpdateManyArgs ( this . model , normalizedArgs ) ) ,
1717 )
1818 . with ( 'updateManyAndReturn' , ( ) =>
1919 this . runUpdateManyAndReturn (
20- this . inputValidator . validateUpdateManyAndReturnArgs ( this . model , normalizeArgs ) ,
20+ this . inputValidator . validateUpdateManyAndReturnArgs ( this . model , normalizedArgs ) ,
2121 ) ,
2222 )
23- . with ( 'upsert' , ( ) => this . runUpsert ( this . inputValidator . validateUpsertArgs ( this . model , normalizeArgs ) ) )
23+ . with ( 'upsert' , ( ) => this . runUpsert ( this . inputValidator . validateUpsertArgs ( this . model , normalizedArgs ) ) )
2424 . exhaustive ( ) ;
2525 }
2626
0 commit comments