🎨 typo

This commit is contained in:
Flam3rboy 2021-02-04 09:53:55 +01:00
parent 284e159ae2
commit 251b23e321
2 changed files with 5 additions and 5 deletions

View File

@ -5,12 +5,12 @@ This repository contains the HTTP API Server and the WebSocket Gateway Server
[Project Board](https://github.com/discord-open-source/discord-server/projects/4)
## API
[Project Board](https://github.com/discord-open-source/discord-server/projects/3)
[Project Board](https://github.com/discord-open-source/discord-server/projects/6)
For the WebSocket we use [ws](https://www.npmjs.com/package/ws) and we'll write our own packet handler for the individual opcodes and events.
## Gateway
[Project Board](https://github.com/discord-open-source/discord-server/projects/6)
[Project Board](https://github.com/discord-open-source/discord-server/projects/3)
We use [express](https://expressjs.com/) for the HTTP Server and
[lambert-server](https://www.npmjs.com/package/lambert-server) for route handling and body validation (customized).

View File

@ -6,7 +6,9 @@ import jwt from "jsonwebtoken";
import Config from "../../../../util/Config";
import { User } from "../../../../models/User";
import { adjustEmail } from "./register";
const router: Router = Router();
export default router;
router.post(
"/",
@ -21,7 +23,7 @@ router.post(
async (req: Request, res: Response) => {
const { login, password } = req.body;
// query for user with same email or phone number
// * MongoDB Specific query for user with same email or phone number
const userquery = { $or: [{ email: adjustEmail(login) }, { phone: login }] };
const user: User = await db.data
.users(userquery)
@ -70,8 +72,6 @@ export async function generateToken(id: bigint) {
});
}
export default router;
/**
* POST /auth/login
* @argument { login: "email@gmail.com", password: "cleartextpassword", undelete: false, captcha_key: null, login_source: null, gift_code_sku_id: null, }