summaryrefslogtreecommitdiff
path: root/api/db
diff options
context:
space:
mode:
authorJoe Carstairs <jcarstairs@scottlogic.com>2024-01-22 13:12:54 +0000
committerJoe Carstairs <jcarstairs@scottlogic.com>2024-01-29 10:51:49 +0000
commitde0c6a4c5d954daf0954539e034947c83086327b (patch)
tree7288dc8de346043354f7378902de268c26c476e7 /api/db
parentc6cbf9a32b58c5092892932d879a8b2963a19f08 (diff)
Fixes adding an authenticator
Diffstat (limited to 'api/db')
-rw-r--r--api/db/_addAuthenticator.ts16
1 files changed, 8 insertions, 8 deletions
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}'
);
`;