Update viewer.tsx (#7428)

This commit is contained in:
Omar López authored and GitHub committed 2023-02-27 12:39:26 -07:00
1 parent b9064b1f72
commit 2a98ca4b91
1 file changed
+2 -1
+2 -1
View File
@@ -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)