Skip to content

Commit

Permalink
chore: simplify getPersonByUserId by removing legacy person support (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
mattinannt authored Nov 20, 2023
1 parent 91ceffb commit 3f8bf4c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/lib/person/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ export const getPersonByUserId = async (environmentId: string, userId: string):
select: selectPerson,
});

if (personWithUserId) {
return personWithUserId ? transformPrismaPerson(personWithUserId) : null;

/* if (personWithUserId) {
return transformPrismaPerson(personWithUserId);
}
Expand Down Expand Up @@ -350,9 +352,9 @@ export const getPersonByUserId = async (environmentId: string, userId: string):
id: personWithUserIdAttribute.id,
environmentId,
userId,
});
});
return transformPrismaPerson(personWithUserIdAttribute);
return transformPrismaPerson(personWithUserIdAttribute); */
},
[`getPersonByUserId-${environmentId}-${userId}`],
{
Expand Down

0 comments on commit 3f8bf4c

Please sign in to comment.