Created the user.ts routes
This commit is contained in:
11
api/routes/user.ts
Normal file
11
api/routes/user.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import Router, {Response} from "express";
|
||||||
|
import {AuthenticatedRequest} from "../middlewares/authenticate";
|
||||||
|
|
||||||
|
const app = Router();
|
||||||
|
|
||||||
|
app.get("/@me", (req: AuthenticatedRequest, res: Response) => res.json({
|
||||||
|
clientId: req.user.clientId, username: req.user.username, rank: req.user.rank, locale: req.user.locale,
|
||||||
|
avatarId: req.user.avatarId
|
||||||
|
}));
|
||||||
|
|
||||||
|
module.exports = app;
|
Reference in New Issue
Block a user