Better show key
This commit is contained in:
parent
6d190bcc71
commit
9769298d94
|
@ -2,7 +2,13 @@ import { decryptKey } from '../lib/paloalto'
|
||||||
import prisma from '../prisma'
|
import prisma from '../prisma'
|
||||||
|
|
||||||
const PAHost = {
|
const PAHost = {
|
||||||
key: parent => `${decryptKey(parent.encryptedKey).slice(0, 5)}*****`,
|
key: parent => {
|
||||||
|
const decryptedKey = decryptKey(parent.encryptedKey)
|
||||||
|
return `${decryptedKey.slice(0, 3)}*****${decryptedKey.slice(
|
||||||
|
decryptedKey.length - 4,
|
||||||
|
decryptedKey.length
|
||||||
|
)}`
|
||||||
|
},
|
||||||
owner: parent => prisma.user.findUnique({ where: { id: parent.ownerId } })
|
owner: parent => prisma.user.findUnique({ where: { id: parent.ownerId } })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user