Skip to content

Commit

Permalink
fix: validation issues
Browse files Browse the repository at this point in the history
Signed-off-by: bhavanakarwade <[email protected]>
  • Loading branch information
bhavanakarwade committed Jun 25, 2024
1 parent ad8278e commit ece2b79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 31 deletions.
16 changes: 1 addition & 15 deletions apps/ledger/src/schema/repositories/schema.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,7 @@ export class SchemaRepository {
createdBy: true,
publisherDid: true,
orgId: true,
issuerId: true,
organisation: {
select:{
name: true,
userOrgRoles: {
select: {
user: {
select: {
firstName: true
}
}
}
}
}
}
issuerId: true
},
orderBy: {
[payload.sortField]: SortValue.ASC === payload.sortBy ? SortValue.ASC : SortValue.DESC
Expand Down
18 changes: 2 additions & 16 deletions apps/ledger/src/schema/schema.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,22 +762,8 @@ export class SchemaService extends BaseService {
}

const schemasDetails = response?.schemasResult.map(schemaAttributeItem => {
const attributes = JSON.parse(schemaAttributeItem.attributes);
const firstName = schemaAttributeItem?.['organisation']?.userOrgRoles[0]?.user?.firstName;

return {
createDateTime: schemaAttributeItem.createDateTime,
name: schemaAttributeItem.name,
version: schemaAttributeItem.version,
attributes,
schemaLedgerId: schemaAttributeItem.schemaLedgerId,
createdBy: schemaAttributeItem.createdBy,
publisherDid: schemaAttributeItem.publisherDid,
orgId: schemaAttributeItem.orgId,
issuerId: schemaAttributeItem.issuerId,
organisationName: schemaAttributeItem?.['organisation'].name,
userName: firstName
};
const attributes = JSON.parse(schemaAttributeItem.attributes);
return {...schemaAttributeItem, attributes};
});

const nextPage:number = Number(schemaSearchCriteria.pageNumber) + 1;
Expand Down

0 comments on commit ece2b79

Please sign in to comment.