First commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import type { FastifyInstance } from "fastify";
|
||||
|
||||
export default async function Me(fastify: FastifyInstance) {
|
||||
fastify.post("/", async (req, res) => {
|
||||
if ("error" in req.token)
|
||||
return res.code(400).send(req.token);
|
||||
|
||||
const { password, email, ...safeUser } = req.token.user;
|
||||
return res.send(safeUser);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user