Skip to content

Commit

Permalink
📈 Remove user email from Sentry tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Aug 18, 2023
1 parent 19fc576 commit a4f7f8f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const getAuthenticatedUser = async (
| User
| undefined)
if (!user || !('id' in user)) return
setUser({ id: user.id, email: user.email ?? undefined })
setUser({ id: user.id })
return user
}

Expand All @@ -31,7 +31,7 @@ const authenticateByToken = async (
const user = (await prisma.user.findFirst({
where: { apiTokens: { some: { token: apiToken } } },
})) as User
setUser({ id: user.id, email: user.email ?? undefined })
setUser({ id: user.id })
return user
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const user = await getAuthenticatedUser(req, res)
if (!user) return notAuthenticated(res)

setUser({ email: user.email ?? undefined, id: user.id })
setUser({ id: user.id })
if (req.method === 'GET') {
const credentialsId = req.query.credentialsId as string | undefined
if (!credentialsId) return badRequest(res)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const user = await getAuthenticatedUser(req, res)
if (!user) return notAuthenticated(res)

setUser({ email: user.email ?? undefined, id: user.id })
setUser({ id: user.id })
if (req.method === 'GET') {
const credentialsId = req.query.credentialsId as string | undefined
if (!credentialsId) return badRequest(res)
Expand Down

0 comments on commit a4f7f8f

Please sign in to comment.