File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ export abstract class AbstractServiceSchema extends AbstractService implements S
170170 if ( beforeEvent ?. options ) options = { ...options , ...beforeEvent . options }
171171 }
172172 }
173- const document : Document < T , any , T > = new this . _model ( {
173+ const document = new this . _model < T > ( {
174174 metadata : {
175175 createdBy : this . request ?. user ?. username || 'anonymous' ,
176176 createdAt : new Date ( ) ,
@@ -189,7 +189,7 @@ export abstract class AbstractServiceSchema extends AbstractService implements S
189189 if ( afterEvent ?. created ) created = { ...created , ...afterEvent . created }
190190 }
191191 }
192- return created
192+ return created as unknown as Document < T , any , T >
193193 }
194194
195195 public async update < T extends AbstractSchema | Document > (
You can’t perform that action at this time.
0 commit comments