chore: simplify getPersonByUserId by removing legacy person support (#1649)

This commit is contained in:
Matti Nannt
2023-11-20 22:07:40 +01:00
committed by GitHub
parent 91ceffba01
commit 3f8bf4c34c
+5 -3
View File
@@ -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);
}
@@ -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}`],
{