From de0c6a4c5d954daf0954539e034947c83086327b Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Mon, 22 Jan 2024 13:12:54 +0000 Subject: Fixes adding an authenticator --- api/db/_addAuthenticator.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'api/db') diff --git a/api/db/_addAuthenticator.ts b/api/db/_addAuthenticator.ts index 9df50da..d7b7512 100644 --- a/api/db/_addAuthenticator.ts +++ b/api/db/_addAuthenticator.ts @@ -10,19 +10,19 @@ export default async function addAuthenticator(authenticator: Authenticator) { ${AUTHENTICATORS.fields.backedUp}, ${AUTHENTICATORS.fields.counter}, ${AUTHENTICATORS.fields.deviceType}, - ${AUTHENTICATORS.fields.publicKey} + ${AUTHENTICATORS.fields.publicKey}, ${AUTHENTICATORS.fields.transports}, ${AUTHENTICATORS.fields.type}, ${AUTHENTICATORS.fields.userId} ) VALUES ( - ${authenticator.id}, - ${authenticator.backedUp}, + '{ ${authenticator.id.toString()} }', + ${authenticator.backedUp ? 'TRUE' : 'FALSE'}, ${authenticator.counter}, - ${authenticator.deviceType}, - ${authenticator.publicKey} - { ${authenticator.transports.join(', ')} }, - ${authenticator.type}, - ${authenticator.userId} + '${authenticator.deviceType}', + '{ ${authenticator.publicKey.toString()} }', + '{ ${authenticator.transports.join(',')} }', + '${authenticator.type}', + '${authenticator.userId}' ); `; -- cgit v1.2.3