summary refs log tree commit diff
path: root/src/api/routes/auth/logout.ts
blob: e1bdbea35c321145b229e4a61494c117f811e5d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { route } from "@fosscord/api";
import { Request, Response, Router } from "express";

const router: Router = Router();
export default router;

router.post("/", route({}), async (req: Request, res: Response) => {
	if (req.body.provider != null || req.body.voip_provider != null) {
		console.log(`[LOGOUT]: provider or voip provider not null!`, req.body);
	} else {
		delete req.body.provider;
		delete req.body.voip_provider;
		if (Object.keys(req.body).length != 0)
			console.log(`[LOGOUT]: Extra fields sent in logout!`, req.body);
	}
	res.status(204).send();
});