mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Fixed #1583 you can now delete users.
Fixed the issue where the requested by was not showing. Finally fixed the broken poster paths
This commit is contained in:
parent
c3b2ef2f31
commit
1dc8eac035
27 changed files with 157 additions and 155 deletions
|
@ -13,5 +13,6 @@ namespace Ombi.Core.Engine.Interfaces
|
|||
RequestCountModel RequestCount();
|
||||
Task<IEnumerable<T>> GetRequests(int count, int position);
|
||||
Task<IEnumerable<T>> GetRequests();
|
||||
Task<bool> UserHasRequest(string userId);
|
||||
}
|
||||
}
|
|
@ -120,7 +120,10 @@ namespace Ombi.Core.Engine
|
|||
public async Task<IEnumerable<MovieRequests>> GetRequests(int count, int position)
|
||||
{
|
||||
var allRequests = await MovieRepository.GetWithUser().Skip(position).Take(count).ToListAsync();
|
||||
allRequests.ForEach(x => PosterPathHelper.FixPosterPath(x.PosterPath));
|
||||
allRequests.ForEach(x =>
|
||||
{
|
||||
x.PosterPath = PosterPathHelper.FixPosterPath(x.PosterPath);
|
||||
});
|
||||
return allRequests;
|
||||
}
|
||||
|
||||
|
@ -258,6 +261,11 @@ namespace Ombi.Core.Engine
|
|||
await MovieRepository.Delete(request);
|
||||
}
|
||||
|
||||
public async Task<bool> UserHasRequest(string userId)
|
||||
{
|
||||
return await MovieRepository.GetAll().AnyAsync(x => x.RequestedUserId == userId);
|
||||
}
|
||||
|
||||
private async Task<RequestEngineResult> AddMovieRequest(MovieRequests model, string movieName)
|
||||
{
|
||||
await MovieRepository.Add(model);
|
||||
|
|
|
@ -242,6 +242,11 @@ namespace Ombi.Core.Engine
|
|||
await TvRepository.Delete(request);
|
||||
}
|
||||
|
||||
public async Task<bool> UserHasRequest(string userId)
|
||||
{
|
||||
return await TvRepository.GetChild().AnyAsync(x => x.RequestedUserId == userId);
|
||||
}
|
||||
|
||||
private async Task<RequestEngineResult> AddExistingRequest(ChildRequests newRequest, TvRequests existingRequest)
|
||||
{
|
||||
// Add the child
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Ombi.Core.Models.UI
|
|||
public class UserViewModel
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public string Alias { get; set; }
|
||||
public List<ClaimCheckboxes> Claims { get; set; }
|
||||
public string EmailAddress { get; set; }
|
||||
|
|
|
@ -4,6 +4,7 @@ using Ombi.Core.Rule.Interfaces;
|
|||
using Ombi.Store.Entities;
|
||||
using Ombi.Store.Entities.Requests;
|
||||
using Ombi.Store.Repository;
|
||||
using Ombi.Store.Repository.Requests;
|
||||
|
||||
namespace Ombi.Core.Rule.Rules.Request
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue