Skip to content

Commit

Permalink
Update viewer.tsx (#7428)
Browse files Browse the repository at this point in the history
  • Loading branch information
zomars authored Feb 27, 2023
1 parent b9064b1 commit 2a98ca4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/trpc/server/routers/viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,9 @@ const loggedInViewerRouter = router({
const { credentials } = user;

const enabledApps = await getEnabledApps(credentials);
//TODO: Refactor this to pick up only needed fields and prevent more leaking
let apps = enabledApps.map(
({ credentials: _, credential: _1 /* don't leak to frontend */, ...app }) => {
({ credentials: _, credential: _1, key: _2 /* don't leak to frontend */, ...app }) => {
const credentialIds = credentials.filter((c) => c.type === app.type).map((c) => c.id);
const invalidCredentialIds = credentials
.filter((c) => c.type === app.type && c.invalid)
Expand Down

0 comments on commit 2a98ca4

Please sign in to comment.