File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
apps/verification/src/repositories Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ export class VerificationRepository {
87
87
proofRequestsSearchCriteria : IProofRequestSearchCriteria
88
88
) : Promise < IProofPresentationsListCount > {
89
89
try {
90
- const proofRequestsList = await this . prisma . presentations . findMany ( {
90
+ const proofRequestsListData = await this . prisma . presentations . findMany ( {
91
91
where : {
92
92
orgId,
93
93
OR : [
@@ -115,6 +115,23 @@ export class VerificationRepository {
115
115
take : Number ( proofRequestsSearchCriteria . pageSize ) ,
116
116
skip : ( proofRequestsSearchCriteria . pageNumber - 1 ) * proofRequestsSearchCriteria . pageSize
117
117
} ) ;
118
+
119
+ const proofRequestsList = await Promise . all (
120
+ proofRequestsListData . map ( async ( presentation ) => {
121
+ if ( ! presentation . connectionId ) {
122
+ return { ...presentation , theirLabel : null } ;
123
+ }
124
+ const connection = await this . prisma . connections . findUnique ( {
125
+ where : { connectionId : presentation . connectionId } ,
126
+ select : { theirLabel : true }
127
+ } ) ;
128
+ return {
129
+ ...presentation ,
130
+ theirLabel : connection ?. theirLabel ?? null
131
+ } ;
132
+ } )
133
+ ) ;
134
+
118
135
const proofRequestsCount = await this . prisma . presentations . count ( {
119
136
where : {
120
137
orgId,
You can’t perform that action at this time.
0 commit comments