Skip to content

Commit

Permalink
limit entity description on grid
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgehl3n committed Nov 19, 2023
1 parent 79de678 commit 4fe9aa2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controllers/InstitutionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class InstitutionController {
UserRoleService.GenerateUserServiceToInstitution(authenticatedRequest.user!, institution);
}

return res.status(200).send({ id: institution?.id});
return res.status(200).send({ id: institution?.id });
}
catch (error) {
console.error(error);
Expand Down Expand Up @@ -235,6 +235,8 @@ class InstitutionController {
const institutionViewList: Object[] = [];
for (let i = 0; i < entities.length; i++) {
entities[i] = await _mapInstitutionImage(entities[i]);
if (entities[i].description && entities[i].description.length > 100)
entities[i].description = entities[i].description.substring(0, 100) + "...";
const entityView = entities[i];
_mapRolesSearch(entityView, userRoles, institutionViewList);
}
Expand Down

0 comments on commit 4fe9aa2

Please sign in to comment.