diff --git a/docs/Testing/Testing.docx b/docs/Testing/Testing.docx index dd46a6a..1eae7d8 100644 Binary files a/docs/Testing/Testing.docx and b/docs/Testing/Testing.docx differ diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 2004dbd..b9af9ca 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -147,8 +147,6 @@ paths: $ref: '#/components/schemas/Idea' '400': description: Bad Request - Id not a positive integer, or no fields provided - '401': - description: Unauthorized - Missing or invalid token '404': description: Not Found - No idea with that id belongs to this user '409': diff --git a/src/repositories/projectsRepo.js b/src/repositories/projectsRepo.js index 3a5c67f..d11317d 100644 --- a/src/repositories/projectsRepo.js +++ b/src/repositories/projectsRepo.js @@ -29,7 +29,7 @@ export async function getAll( orderBy: { [safeSortBy]: safeOrder }, skip: offset, take: limit, - include: { files: true }, + include: { files: false }, }); return projects; @@ -47,7 +47,7 @@ export async function getById(projectId, userId) { const project = await prisma.project.findUnique({ where: { id: projectId }, - include: { files: true }, + include: { files: false }, }); if (project && project.userId !== userId) { @@ -64,7 +64,7 @@ export async function create(userId, projectData) { const newProject = await prisma.project.create({ data: { ...projectData, userId }, - include: { files: true }, + include: { files: false }, }); return newProject; @@ -92,7 +92,7 @@ export async function update(projectId, userId, updatedData) { const updatedProject = await prisma.project.update({ where: { id: projectId }, data: updatedData, - include: { files: true }, + include: { files: false }, }); return updatedProject; @@ -118,7 +118,7 @@ export async function remove(projectId, userId) { const deletedProject = await prisma.project.delete({ where: { id: projectId }, - include: { files: true }, + include: { files: false }, }); return deletedProject;