File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -104,9 +104,14 @@ const newsRoute: RouteType = (apiRouter) => {
104
104
) ;
105
105
106
106
try {
107
- const { body} = req ;
107
+ const { body, decodedAccessToken} = req ;
108
+ const { uid : userId } = decodedAccessToken ;
108
109
109
- const result = await newsService . annotateNews ( uniqueRequestId , body ) ;
110
+ const result = await newsService . annotateNews (
111
+ uniqueRequestId ,
112
+ userId ,
113
+ body
114
+ ) ;
110
115
111
116
logger . debug (
112
117
uniqueRequestId ,
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ export default class NewsService {
48
48
49
49
public async annotateNews (
50
50
uniqueRequestId : NullableString ,
51
+ userId : string ,
51
52
annotationInputDTO : iNewsAnnotationsInputDTO
52
53
) : Promise < iGenericServiceResult < null > > {
53
54
return db . tx ( "annotate-news" , async ( transaction ) => {
@@ -87,7 +88,7 @@ export default class NewsService {
87
88
newsId,
88
89
annotationId,
89
90
annotatedBy : "USER" ,
90
- userId : null , // FIXME: Add userId from request
91
+ userId,
91
92
} ;
92
93
} ) ;
93
94
You can’t perform that action at this time.
0 commit comments