altered getFilesByProjectId to not return the full byte data of each file. It now just returns the metadata.
This commit is contained in:
Binary file not shown.
@@ -161,6 +161,13 @@ export async function getFilesByProjectId(projectId, userId) {
|
|||||||
|
|
||||||
const files = await prisma.file.findMany({
|
const files = await prisma.file.findMany({
|
||||||
where: { projectId },
|
where: { projectId },
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
projectId: true,
|
||||||
|
name: true,
|
||||||
|
size: true,
|
||||||
|
mimeType: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return files;
|
return files;
|
||||||
|
|||||||
Reference in New Issue
Block a user