From 0da2054aa4f190cd6791dbdee773c4aa13109e8d Mon Sep 17 00:00:00 2001 From: andreas-unleash <104830839+andreas-unleash@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:50:54 +0300 Subject: [PATCH] fixed missing role by calling get after insert (#2091) * fixed missing role by calling get after insert * update snapshot --- src/lib/db/public-signup-token-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/db/public-signup-token-store.ts b/src/lib/db/public-signup-token-store.ts index ea76a45d34..b4fb152827 100644 --- a/src/lib/db/public-signup-token-store.ts +++ b/src/lib/db/public-signup-token-store.ts @@ -152,9 +152,9 @@ export class PublicSignupTokenStore implements IPublicSignupTokenStore { ): Promise { const response = await this.db(TABLE).insert( toRow(newToken), - ['*'], + ['secret'], ); - return toTokens(response)[0]; + return this.get(response[0].secret); } async isValid(secret: string): Promise {