Add hidden event types
This commit is contained in:
1 parent
b32a4c75c0
commit
c320b0f20d
5 files changed
+72
-8
No files matched your search
@@ -26,12 +26,14 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
const title = req.body.title;
|
||||
const description = req.body.description;
|
||||
const length = parseInt(req.body.length);
|
||||
const hidden = req.body.hidden;
|
||||
|
||||
const createEventType = await prisma.eventType.create({
|
||||
data: {
|
||||
title: title,
|
||||
description: description,
|
||||
length: length,
|
||||
hidden: hidden,
|
||||
userId: user.id,
|
||||
},
|
||||
});
|
||||
@@ -56,6 +58,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
const title = req.body.title;
|
||||
const description = req.body.description;
|
||||
const length = parseInt(req.body.length);
|
||||
const hidden = req.body.hidden;
|
||||
|
||||
const updateEventType = await prisma.eventType.update({
|
||||
where: {
|
||||
@@ -64,7 +67,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
data: {
|
||||
title: title,
|
||||
description: description,
|
||||
length: length
|
||||
length: length,
|
||||
hidden: hidden
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user