File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import {
30
30
type PromptVariantResponse ,
31
31
type PromptVariantResponseList ,
32
32
type UpdatePromptVariantResponse ,
33
+ type VariantResponse ,
33
34
} from './dto' ;
34
35
import { type PromptVariantResponseRepository } from './prompt-variant-response.repository' ;
35
36
@@ -244,12 +245,13 @@ export const PromptVariantResponseListService = <
244
245
responses : this . resource . Variants . map ( ( { key } ) => ( {
245
246
...responses . get ( key ) ,
246
247
...( variant . key === key
247
- ? {
248
+ ? ( {
248
249
variant : key ,
249
250
response : input . response ,
250
- creator : responses . get ( key ) ?. creator ?? session . userId ,
251
+ // TODO I'm not sure it's right to fallback to the current user...?
252
+ creator : responses . get ( key ) ?. creator ?? { id : session . userId } ,
251
253
modifiedAt : DateTime . now ( ) ,
252
- }
254
+ } satisfies UnsecuredDto < VariantResponse > )
253
255
: { } ) ,
254
256
} ) ) ,
255
257
} ;
You can’t perform that action at this time.
0 commit comments