diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-26 22:08:14 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-26 22:08:14 +1000 |
commit | 849b257db7d43c2f1d13d9620ce7f6ba9dfd3e50 (patch) | |
tree | 37c9af175c98116a0f48ca2d5c8b74f291b3ce85 /src/api/routes/auth/mfa | |
parent | Fix scripts/benchmark/connections.js (diff) | |
download | server-849b257db7d43c2f1d13d9620ce7f6ba9dfd3e50.tar.xz |
Move schemas to /src/util/schemas
Diffstat (limited to 'src/api/routes/auth/mfa')
-rw-r--r-- | src/api/routes/auth/mfa/totp.ts | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/api/routes/auth/mfa/totp.ts b/src/api/routes/auth/mfa/totp.ts index 50b9e9c8..96a48b66 100644 --- a/src/api/routes/auth/mfa/totp.ts +++ b/src/api/routes/auth/mfa/totp.ts @@ -1,17 +1,10 @@ import { Router, Request, Response } from "express"; import { route } from "@fosscord/api"; -import { BackupCode, FieldErrors, generateToken, User } from "@fosscord/util"; +import { BackupCode, generateToken, User, TotpSchema } from "@fosscord/util"; import { verifyToken } from "node-2fa"; import { HTTPError } from "lambert-server"; const router = Router(); -export interface TotpSchema { - code: string, - ticket: string, - gift_code_sku_id?: string | null, - login_source?: string | null, -} - router.post("/", route({ body: "TotpSchema" }), async (req: Request, res: Response) => { const { code, ticket, gift_code_sku_id, login_source } = req.body as TotpSchema; |