refactor(backend): use insert instead of save
This commit is contained in:
parent
91c56ceb6e
commit
37a4e5f4fc
6 changed files with 10 additions and 10 deletions
|
|
@ -130,7 +130,7 @@ export default define(meta, async (ps, user) => {
|
|||
|
||||
const credentialIdString = credentialId.toString('hex');
|
||||
|
||||
await UserSecurityKeys.save({
|
||||
await UserSecurityKeys.insert({
|
||||
userId: user.id,
|
||||
id: credentialIdString,
|
||||
lastUsed: new Date(),
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export default define(meta, async (ps, user) => {
|
|||
|
||||
const challengeId = genId();
|
||||
|
||||
await AttestationChallenges.save({
|
||||
await AttestationChallenges.insert({
|
||||
userId: user.id,
|
||||
id: challengeId,
|
||||
challenge: hash(Buffer.from(challenge, 'utf-8')).toString('hex'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue