Skip to content

Commit

Permalink
fix: thumbnails not showing up on folder view #563
Browse files Browse the repository at this point in the history
  • Loading branch information
diced committed Jun 18, 2024
1 parent 5e37d89 commit 1f00dd5
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions src/pages/api/user/folders/[id].ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ async function handler(req: NextApiReq, res: NextApiRes, user: UserExtended) {
id: idParsed,
},
select: {
files: !!req.query.files,
files: req.query.files
? {
include: {
thumbnail: true,
},
}
: false,
id: true,
name: true,
userId: true,
Expand Down Expand Up @@ -70,7 +76,13 @@ async function handler(req: NextApiReq, res: NextApiRes, user: UserExtended) {
},
},
select: {
files: !!req.query.files,
files: req.query.files
? {
include: {
thumbnail: true,
},
}
: false,
id: true,
name: true,
userId: true,
Expand Down Expand Up @@ -111,7 +123,13 @@ async function handler(req: NextApiReq, res: NextApiRes, user: UserExtended) {
public: !!publicFolder,
},
select: {
files: !!req.query.files,
files: req.query.files
? {
include: {
thumbnail: true,
},
}
: false,
id: true,
name: true,
userId: true,
Expand Down Expand Up @@ -200,7 +218,13 @@ async function handler(req: NextApiReq, res: NextApiRes, user: UserExtended) {
},
},
select: {
files: !!req.query.files,
files: req.query.files
? {
include: {
thumbnail: true,
},
}
: false,
id: true,
name: true,
userId: true,
Expand Down

0 comments on commit 1f00dd5

Please sign in to comment.