From e1f5c9093ba20f41224bf7a970eb66865ddd80c4 Mon Sep 17 00:00:00 2001 From: realmayus Date: Thu, 10 Oct 2024 15:18:03 +0200 Subject: [PATCH] fix compilation errors (webstorm's incremental TS compilation doesn't notice prisma schema changes..) --- common/secret/index.ts | 2 +- common/secret/token.ts | 8 ++++---- graphql/secret/mutation.ts | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common/secret/index.ts b/common/secret/index.ts index 78cdc0181..df3badfce 100644 --- a/common/secret/index.ts +++ b/common/secret/index.ts @@ -15,7 +15,7 @@ export async function getSecrets(user: User): Promise { userId: user.userID, OR: [{ expiresAt: null }, { expiresAt: { gte: new Date() } }], }, - select: { createdAt: true, expiresAt: true, id: true, lastUsed: true, type: true, userId: true, description: true, deviceId: true }, + select: { createdAt: true, expiresAt: true, id: true, lastUsed: true, type: true, userId: true, description: true, lastUsedDeviceId: true }, }); logger.info(`User(${user.userID}) retrieved ${result.length} secrets`); diff --git a/common/secret/token.ts b/common/secret/token.ts index 19c4bc568..8aa2c85cc 100644 --- a/common/secret/token.ts +++ b/common/secret/token.ts @@ -63,7 +63,7 @@ export async function createToken( expiresAt, lastUsed: null, description, - deviceId, + lastUsedDeviceId: deviceId, }, }); @@ -140,10 +140,10 @@ export async function loginToken(token: string, deviceId: string): Promise