mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(quota): block multi-season requests that would exceed a user's quota (#1874)
* fix(quota): block multi-season requests that would exceed a user's quota * fix(docs): add missing request user option to API docs Co-authored-by: sct <ryan@sct.dev>
This commit is contained in:
@@ -350,6 +350,14 @@ requestRoutes.post('/', async (req, res, next) => {
|
||||
status: 202,
|
||||
message: 'No seasons available to request',
|
||||
});
|
||||
} else if (
|
||||
quotas.tv.limit &&
|
||||
finalSeasons.length > (quotas.tv.remaining ?? 0)
|
||||
) {
|
||||
return next({
|
||||
status: 403,
|
||||
message: 'Series Quota Exceeded',
|
||||
});
|
||||
}
|
||||
|
||||
await mediaRepository.save(media);
|
||||
|
Reference in New Issue
Block a user