summary refs log tree commit diff
path: root/src/api/routes/users/#id/index.ts
blob: bdb1060f893db24522e2aab024d9c56dc9d361da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { Router, Request, Response } from "express";
import { User } from "@fosscord/util";
import { route } from "@fosscord/api";

const router: Router = Router();

router.get("/", route({}), async (req: Request, res: Response) => {
	const { id } = req.params;

	res.json(await User.getPublicUser(id));
});

export default router;