Fix type/lint issues

This commit is contained in:
Tuan Dang
2024-02-26 20:01:30 -08:00
parent 768cc64af6
commit 2d9526ad8d
3 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import { ActorType } from "@app/services/auth/auth-type";
// this is a unique id for sending posthog event
export const getTelemetryDistinctId = (req: FastifyRequest) => {
if (req.auth.actor === ActorType.USER) {
return req.auth.user.email;
return req.auth.user.username;
}
if (req.auth.actor === ActorType.IDENTITY) {
return `identity-${req.auth.identityId}`;