mirror of
https://github.com/detleph/server.git
synced 2026-09-04 08:36:06 +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({
|
const events = await prisma.event.findMany({
|
||||||
select: {
|
select: {
|
||||||
name: true,
|
name: true,
|
||||||
|
description: true,
|
||||||
date: true,
|
date: true,
|
||||||
pid: true,
|
pid: true,
|
||||||
id: false,
|
id: false,
|
||||||
@@ -26,6 +27,7 @@ const addEvent = async (req: Request, res: Response) => {
|
|||||||
data: {
|
data: {
|
||||||
name: req.body.name,
|
name: req.body.name,
|
||||||
date: req.body.date,
|
date: req.body.date,
|
||||||
|
description: req.body.description,
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
name: true,
|
name: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user