fix(api): ignore filter if unset in media route (#2647)

Co-authored-by: Ryan Cohen <ryan@sct.dev>
pull/2793/head
Danshil Kokil Mungur 2 years ago committed by GitHub
parent eb5248d8d1
commit a6c1f3f7ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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,

Loading…
Cancel
Save