Essaie de coudinary : échec

This commit is contained in:
ETHEVE Fabien
2023-02-09 13:28:11 +01:00
parent 7108d33322
commit f9c3a9ec9b
7 changed files with 1574 additions and 4 deletions
+10 -1
View File
@@ -2,12 +2,13 @@ import express from "express";
import { PrismaClient } from "@prisma/client";
import createError from "http-errors"
import jeuxValidation from "../jeuxValidator.js";
const router = express.Router()
const prisma = new PrismaClient();
router.post('/jeux',async (req,res,next)=>{
let jeuxData;
jeuxData = jeuxValidation.parse(req.body)
@@ -31,6 +32,14 @@ router.post('/jeux',async (req,res,next)=>{
})
router.get('/jeux', async(req,res)=>{
let jeux = await prisma.jeux.findMany({
include:{
groupe:true
}
})
res.json(jeux)
})