Move schemas to /src/util/schemas

This commit is contained in:
Madeline
2022-09-26 22:08:14 +10:00
parent 186f28516c
commit 849b257db7
94 changed files with 18692 additions and 18808 deletions
@@ -1,13 +1,9 @@
import { Router, Request, Response } from "express";
import { route } from "@fosscord/api";
import { FieldErrors, User } from "@fosscord/util";
import { FieldErrors, User, BackupCodesChallengeSchema } from "@fosscord/util";
import bcrypt from "bcrypt";
const router = Router();
export interface BackupCodesChallengeSchema {
password: string;
}
router.post("/", route({ body: "BackupCodesChallengeSchema" }), async (req: Request, res: Response) => {
const { password } = req.body as BackupCodesChallengeSchema;