mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 08:16:05 -07:00
Add quota fields to user view model
This commit is contained in:
parent
cfd9deb17e
commit
9c574fb7e9
7 changed files with 39 additions and 7 deletions
|
@ -486,9 +486,13 @@ namespace Ombi.Core.Engine
|
|||
return new RequestEngineResult {Result = true, Message = $"{movieName} has been successfully added!"};
|
||||
}
|
||||
|
||||
public async Task<RequestQuotaCountModel> GetRemainingRequests()
|
||||
public async Task<RequestQuotaCountModel> GetRemainingRequests(OmbiUser user)
|
||||
{
|
||||
OmbiUser user = await GetUser();
|
||||
if (user == null)
|
||||
{
|
||||
user = await GetUser();
|
||||
}
|
||||
|
||||
int limit = user.MovieRequestLimit ?? 0;
|
||||
|
||||
if (limit <= 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue