diff options
Diffstat (limited to 'src/api/routes/users/@me/mfa/totp/enable.ts')
-rw-r--r-- | src/api/routes/users/@me/mfa/totp/enable.ts | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/api/routes/users/@me/mfa/totp/enable.ts b/src/api/routes/users/@me/mfa/totp/enable.ts index e4ce9ce0..adafe180 100644 --- a/src/api/routes/users/@me/mfa/totp/enable.ts +++ b/src/api/routes/users/@me/mfa/totp/enable.ts @@ -1,19 +1,12 @@ import { Router, Request, Response } from "express"; -import { User, generateToken, BackupCode, generateMfaBackupCodes } from "@fosscord/util"; +import { User, generateToken, generateMfaBackupCodes, TotpEnableSchema } from "@fosscord/util"; import { route } from "@fosscord/api"; import bcrypt from "bcrypt"; import { HTTPError } from "lambert-server"; import { verifyToken } from 'node-2fa'; -import crypto from "crypto"; const router = Router(); -export interface TotpEnableSchema { - password: string; - code?: string; - secret?: string; -} - router.post("/", route({ body: "TotpEnableSchema" }), async (req: Request, res: Response) => { const body = req.body as TotpEnableSchema; |