diff options
Diffstat (limited to 'src/api/routes/auth/login.ts')
-rw-r--r-- | src/api/routes/auth/login.ts | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/api/routes/auth/login.ts b/src/api/routes/auth/login.ts index bcaccb30..9bed5aab 100644 --- a/src/api/routes/auth/login.ts +++ b/src/api/routes/auth/login.ts @@ -1,21 +1,12 @@ import { Request, Response, Router } from "express"; import { route, getIpAdress, verifyCaptcha } from "@fosscord/api"; import bcrypt from "bcrypt"; -import { Config, User, generateToken, adjustEmail, FieldErrors } from "@fosscord/util"; +import { Config, User, generateToken, adjustEmail, FieldErrors, LoginSchema } from "@fosscord/util"; import crypto from "crypto"; const router: Router = Router(); export default router; -export interface LoginSchema { - login: string; - password: string; - undelete?: boolean; - captcha_key?: string; - login_source?: string; - gift_code_sku_id?: string; -} - router.post("/", route({ body: "LoginSchema" }), async (req: Request, res: Response) => { const { login, password, captcha_key, undelete } = req.body as LoginSchema; const email = adjustEmail(login); |