Created the user.ts routes
This commit is contained in:
parent
d7eb0caa1e
commit
c9bda3ab32
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;
|
Loading…
x
Reference in New Issue
Block a user