Skip to content

Commit

Permalink
fix(api): ignore filter if unset in media route (#2647)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Cohen <ryan@sct.dev>
  • Loading branch information
danshilm and sct committed May 28, 2022
1 parent eb5248d commit a6c1f3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/routes/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ mediaRoutes.get('/', async (req, res, next) => {
try {
const [media, mediaCount] = await mediaRepository.findAndCount({
order: sortFilter,
where: {
where: statusFilter && {
status: statusFilter,
},
take: pageSize,
Expand Down

0 comments on commit a6c1f3f

Please sign in to comment.