Feat: event-types and tests
This commit is contained in:
1 parent
2e2f6a5e57
commit
a2817a2fee
16 files changed
+15892
-205
No files matched your search
@@ -1,19 +0,0 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
import prisma from "@calcom/prisma";
|
||||
import { User } from "@calcom/prisma/client";
|
||||
|
||||
type Data = {
|
||||
message: string;
|
||||
};
|
||||
|
||||
export default async function userId(req: NextApiRequest, res: NextApiResponse<Data>) {
|
||||
const { id }: { id?: string } = req.query;
|
||||
if (!id) return res.status(404).json({ message: `User not found` });
|
||||
const user = await prisma.user.findUnique({
|
||||
where: {
|
||||
id: parseInt(id),
|
||||
},
|
||||
});
|
||||
return res.json({ message: `Hello ${user?.name}` });
|
||||
}
|
||||
Reference in new issue
Block a user