|
|
@ -256,6 +256,9 @@ requestRoutes.post('/', async (req, res, next) => {
|
|
|
|
.leftJoin('request.media', 'media')
|
|
|
|
.leftJoin('request.media', 'media')
|
|
|
|
.where('request.is4k = :is4k', { is4k: req.body.is4k })
|
|
|
|
.where('request.is4k = :is4k', { is4k: req.body.is4k })
|
|
|
|
.andWhere('media.tmdbId = :tmdbId', { tmdbId: tmdbMedia.id })
|
|
|
|
.andWhere('media.tmdbId = :tmdbId', { tmdbId: tmdbMedia.id })
|
|
|
|
|
|
|
|
.andWhere('request.status != :requestStatus', {
|
|
|
|
|
|
|
|
requestStatus: MediaRequestStatus.DECLINED,
|
|
|
|
|
|
|
|
})
|
|
|
|
.getOne();
|
|
|
|
.getOne();
|
|
|
|
|
|
|
|
|
|
|
|
if (existing) {
|
|
|
|
if (existing) {
|
|
|
|