summary refs log tree commit diff
path: root/src/api/routes/users/@me/mfa/webauthn
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-06-11 22:16:07 +0200
committerRory& <root@rory.gay>2026-06-12 17:58:18 +0200
commitc77d00e243f7cf104b8b0f8b26f339849dbd040f (patch)
tree457a1aac1da052b3be56812a90c8ca50e6b3df51 /src/api/routes/users/@me/mfa/webauthn
parentMove database to toplevel (diff)
downloadserver-ts-c77d00e243f7cf104b8b0f8b26f339849dbd040f.tar.xz
Move entities to database
Diffstat (limited to 'src/api/routes/users/@me/mfa/webauthn')
-rw-r--r--src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts2
-rw-r--r--src/api/routes/users/@me/mfa/webauthn/credentials/index.ts6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts b/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts

index 65c01806..c15a0144 100644 --- a/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts +++ b/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts
@@ -17,7 +17,7 @@ */ import { route } from "@spacebar/api"; -import { SecurityKey, User } from "@spacebar/util"; +import { SecurityKey, User } from "@spacebar/database"; import { Request, Response, Router } from "express"; const router = Router({ mergeParams: true }); diff --git a/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts b/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts
index 6c877189..774c4138 100644 --- a/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts +++ b/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts
@@ -16,13 +16,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { route } from "@spacebar/api"; -import { DiscordApiErrors, FieldErrors, generateWebAuthnTicket, SecurityKey, User, verifyWebAuthnToken, WebAuthn } from "@spacebar/util"; import bcrypt from "bcrypt"; import { Request, Response, Router } from "express"; import { ExpectedAttestationResult } from "fido2-lib"; import { HTTPError } from "lambert-server/HTTPError"; +import { route } from "@spacebar/api"; +import { SecurityKey, User } from "@spacebar/database"; +import { DiscordApiErrors, FieldErrors, generateWebAuthnTicket, verifyWebAuthnToken, WebAuthn } from "@spacebar/util"; import { CreateWebAuthnCredentialSchema, GenerateWebAuthnCredentialsSchema, WebAuthnPostSchema } from "@spacebar/schemas"; + const router = Router({ mergeParams: true }); const isGenerateSchema = (body: WebAuthnPostSchema): body is GenerateWebAuthnCredentialsSchema => "password" in body;