v3.0.0/src/api/routes/user/me/get.ts

12 lines
307 B
TypeScript

import type { FastifyReply } from 'fastify';
import type { RequestWithUser } from '../../../structures/interfaces';
export const middlewares = ['auth'];
export const run = async (req: RequestWithUser, res: FastifyReply) => res.send({
message: 'Successfully retrieved user',
user: {
...req.user
}
});