[READ-ONLY] Mirror of https://github.com/thoda-dev/shhh. Self-hostable zero-knowledge pastebin for secrets that expire on their own
docker end-to-end-encryption nuxt nuxtjs pastebin secrets selft-hosted zero-knowledge
Something went wrong. Try again.
123456789101112131415161718192021export default defineEventHandler(async (event) => { await requireAdminSession(event)
const rows = await db .select({ id: schema.invitations.id, email: schema.invitations.email, status: schema.invitations.status, expiresAt: schema.invitations.expiresAt, createdAt: schema.invitations.createdAt, acceptedAt: schema.invitations.acceptedAt, invitedByEmail: schema.users.email }) .from(schema.invitations) .leftJoin(schema.users, eq(schema.invitations.invitedBy, schema.users.id)) .orderBy(desc(schema.invitations.createdAt))
// The token is never returned, not even to an admin: the link is delivered by email and nowhere else, so a leaked response can't be replayed into an account. return rows.map(row => ({ ...row, state: invitationState(row) }))})