mirror of
https://github.com/detleph/server.git
synced 2026-09-04 00:26:03 +02:00
Use the description attribute in add and get controllers
This commit is contained in:
@@ -5,6 +5,7 @@ const getAllEvents = async (req: Request, res: Response) => {
|
||||
const events = await prisma.event.findMany({
|
||||
select: {
|
||||
name: true,
|
||||
description: true,
|
||||
date: true,
|
||||
pid: true,
|
||||
id: false,
|
||||
@@ -26,6 +27,7 @@ const addEvent = async (req: Request, res: Response) => {
|
||||
data: {
|
||||
name: req.body.name,
|
||||
date: req.body.date,
|
||||
description: req.body.description,
|
||||
},
|
||||
select: {
|
||||
name: true,
|
||||
|
||||
Reference in New Issue
Block a user