File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
backend/typescript/services Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -31,18 +31,16 @@ class AdminCommentService implements IAdminCommentService {
3131 let adminCommentDTOs : Array < AdminCommentDTO > = [ ] ;
3232 try {
3333 adminComments = await AdminComment . findAll ( {
34- where : { reviewedApplicantRecordId } ,
35- } ) ;
36- adminCommentDTOs = await adminComments . map ( ( adminComment ) => {
37- return {
38- id : adminComment . id ;
39- userId: adminComment . userId ;
40- applicantRecordId: adminComment . applicantRecordId ;
41- comment: adminComment . comment ;
42- createdAt: adminComment . createdAt ;
43- updatedAt: adminComment . updatedAt ;
44- } ;
34+ where : { applicantRecordId : reviewedApplicantRecordId } ,
4535 } ) ;
36+ adminCommentDTOs = adminComments . map ( ( adminComment ) => ( {
37+ id : adminComment . id ,
38+ userId : adminComment . userId ,
39+ applicantRecordId : adminComment . applicantRecordId ,
40+ comment : adminComment . comment ,
41+ createdAt : adminComment . createdAt . toISOString ( ) ,
42+ updatedAt : adminComment . updatedAt . toISOString ( ) ,
43+ } ) ) ;
4644 } catch ( error : unknown ) {
4745 Logger . error (
4846 `Failed to get admin comments by reviewedApplicantRecordId = ${ reviewedApplicantRecordId } . Reason = ${ getErrorMessage (
Original file line number Diff line number Diff line change 11import { AdminCommentDTO , CreateAdminCommentDTO } from "../../types" ;
22
33interface IAdminCommentService {
4+ getAdminCommentsByApplicantRecordId ( reviewedApplicantRecordId : string ) : Promise < AdminCommentDTO [ ] > ;
5+ getAdminCommentById ( id : string ) : Promise < AdminCommentDTO > ;
46 createAdminComment ( content : CreateAdminCommentDTO ) : Promise < AdminCommentDTO > ;
57 updateAdminComment (
68 commentId : string ,
You can’t perform that action at this time.
0 commit comments