|
|
@ -89,7 +89,7 @@ requestRoutes.get('/', async (req, res, next) => {
|
|
|
|
requestStatus: statusFilter,
|
|
|
|
requestStatus: statusFilter,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.andWhere(
|
|
|
|
.andWhere(
|
|
|
|
'(request.is4k = false AND media.status IN (:...mediaStatus)) OR (request.is4k = true AND media.status4k IN (:...mediaStatus))',
|
|
|
|
'((request.is4k = 0 AND media.status IN (:...mediaStatus)) OR (request.is4k = 1 AND media.status4k IN (:...mediaStatus)))',
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mediaStatus: mediaStatusFilter,
|
|
|
|
mediaStatus: mediaStatusFilter,
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -101,7 +101,7 @@ requestRoutes.get('/', async (req, res, next) => {
|
|
|
|
{ type: 'or' }
|
|
|
|
{ type: 'or' }
|
|
|
|
)
|
|
|
|
)
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
query = query.andWhere('request.requestedBy.id = :id', {
|
|
|
|
query = query.andWhere('requestedBy.id = :id', {
|
|
|
|
id: req.user?.id,
|
|
|
|
id: req.user?.id,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|