Merge pull request #149 from mateuszskoczek/features/website_services_refactor
Website services organized
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Net.Http.Headers;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using WatchIt.Website.Services.Utility.Tokens;
|
||||
using WatchIt.Website.Services.WebAPI.Accounts;
|
||||
using WatchIt.Website.Services.Client.Accounts;
|
||||
using WatchIt.Website.Services.Tokens;
|
||||
|
||||
namespace WatchIt.Website.Services.Utility.Authentication;
|
||||
namespace WatchIt.Website.Services.Authentication;
|
||||
|
||||
public class AuthenticationService : IAuthenticationService
|
||||
{
|
||||
@@ -13,7 +13,7 @@ public class AuthenticationService : IAuthenticationService
|
||||
private readonly AuthenticationStateProvider _authenticationStateProvider;
|
||||
private readonly HttpClient _httpClient;
|
||||
private readonly ITokensService _tokensService;
|
||||
private readonly IAccountsWebAPIService _accountsWebAPIService;
|
||||
private readonly IAccountsClientService _accountsClientService;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -21,12 +21,12 @@ public class AuthenticationService : IAuthenticationService
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public AuthenticationService(AuthenticationStateProvider authenticationStateProvider, HttpClient httpClient, ITokensService tokensService, IAccountsWebAPIService accountsWebAPIService)
|
||||
public AuthenticationService(AuthenticationStateProvider authenticationStateProvider, HttpClient httpClient, ITokensService tokensService, IAccountsClientService accountsClientService)
|
||||
{
|
||||
_authenticationStateProvider = authenticationStateProvider;
|
||||
_httpClient = httpClient;
|
||||
_tokensService = tokensService;
|
||||
_accountsWebAPIService = accountsWebAPIService;
|
||||
_accountsClientService = accountsClientService;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -65,7 +65,7 @@ public class AuthenticationService : IAuthenticationService
|
||||
if (refreshToken is not null)
|
||||
{
|
||||
_httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("refresh", refreshToken.Replace("\"", ""));
|
||||
await _accountsWebAPIService.Logout();
|
||||
await _accountsClientService.Logout();
|
||||
_httpClient.DefaultRequestHeaders.Authorization = null;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Authentication;
|
||||
namespace WatchIt.Website.Services.Authentication;
|
||||
|
||||
public interface IAuthenticationService
|
||||
{
|
||||
@@ -4,10 +4,10 @@ using System.Text.Json;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using WatchIt.Common.Model.Accounts;
|
||||
using WatchIt.Website.Services.Utility.Tokens;
|
||||
using WatchIt.Website.Services.WebAPI.Accounts;
|
||||
using WatchIt.Website.Services.Tokens;
|
||||
using WatchIt.Website.Services.Client.Accounts;
|
||||
|
||||
namespace WatchIt.Website.Services.Utility.Authentication;
|
||||
namespace WatchIt.Website.Services.Authentication;
|
||||
|
||||
public class JWTAuthenticationStateProvider : AuthenticationStateProvider
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public class JWTAuthenticationStateProvider : AuthenticationStateProvider
|
||||
private readonly ILogger<JWTAuthenticationStateProvider> _logger;
|
||||
|
||||
private readonly ITokensService _tokensService;
|
||||
private readonly IAccountsWebAPIService _accountsService;
|
||||
private readonly IAccountsClientService _accountsService;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -26,7 +26,7 @@ public class JWTAuthenticationStateProvider : AuthenticationStateProvider
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public JWTAuthenticationStateProvider(HttpClient httpClient, ILogger<JWTAuthenticationStateProvider> logger, ITokensService tokensService, IAccountsWebAPIService accountsService)
|
||||
public JWTAuthenticationStateProvider(HttpClient httpClient, ILogger<JWTAuthenticationStateProvider> logger, ITokensService tokensService, IAccountsClientService accountsService)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Authentication;
|
||||
namespace WatchIt.Website.Services.Authentication;
|
||||
|
||||
public class User
|
||||
{
|
||||
@@ -0,0 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.AspNetCore.Components.Authorization">
|
||||
<HintPath>..\..\..\..\..\..\..\Program Files\dotnet\shared\Microsoft.AspNetCore.App\8.0.10\Microsoft.AspNetCore.Components.Authorization.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.Client\WatchIt.Website.Services.Client.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.Tokens\WatchIt.Website.Services.Tokens.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.5.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,13 +1,11 @@
|
||||
using WatchIt.Common.Model.Accounts;
|
||||
using WatchIt.Common.Services.HttpClient;
|
||||
using WatchIt.Website.Services.Utility.Configuration;
|
||||
using WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
using WatchIt.Website.Services.Utility.Tokens;
|
||||
using WatchIt.Website.Services.WebAPI.Common;
|
||||
using WatchIt.Website.Services.Configuration;
|
||||
using WatchIt.Website.Services.Tokens;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Accounts;
|
||||
namespace WatchIt.Website.Services.Client.Accounts;
|
||||
|
||||
public class AccountsWebAPIService(IHttpClientService httpClientService, IConfigurationService configurationService, ITokensService tokensService) : BaseWebAPIService(configurationService), IAccountsWebAPIService
|
||||
public class AccountsClientService(IHttpClientService httpClientService, IConfigurationService configurationService, ITokensService tokensService) : BaseClientService(configurationService), IAccountsClientService
|
||||
{
|
||||
#region PUBLIC METHODS
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using WatchIt.Common.Model.Accounts;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Accounts;
|
||||
namespace WatchIt.Website.Services.Client.Accounts;
|
||||
|
||||
public interface IAccountsWebAPIService
|
||||
public interface IAccountsClientService
|
||||
{
|
||||
Task Register(RegisterRequest data, Action<RegisterResponse>? createdAction = null, Action<IDictionary<string, string[]>>? badRequestAction = null);
|
||||
Task Authenticate(AuthenticateRequest data, Action<AuthenticateResponse>? successAction = null, Action<IDictionary<string, string[]>>? badRequestAction = null, Action? unauthorizedAction = null);
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.WebAPI.Common;
|
||||
namespace WatchIt.Website.Services.Client;
|
||||
|
||||
public enum AuthorizationType
|
||||
{
|
||||
@@ -1,10 +1,9 @@
|
||||
using WatchIt.Website.Services.Utility.Configuration;
|
||||
using WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
using WatchIt.Website.Services.Utility.Tokens;
|
||||
using WatchIt.Website.Services.Configuration;
|
||||
using WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Common;
|
||||
namespace WatchIt.Website.Services.Client;
|
||||
|
||||
public abstract class BaseWebAPIService
|
||||
public abstract class BaseClientService
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
@@ -24,7 +23,7 @@ public abstract class BaseWebAPIService
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
protected BaseWebAPIService(IConfigurationService configurationService)
|
||||
protected BaseClientService(IConfigurationService configurationService)
|
||||
{
|
||||
_configurationService = configurationService;
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
using WatchIt.Common.Model.Genders;
|
||||
using WatchIt.Common.Services.HttpClient;
|
||||
using WatchIt.Website.Services.Utility.Configuration;
|
||||
using WatchIt.Website.Services.WebAPI.Common;
|
||||
using WatchIt.Website.Services.Configuration;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Genders;
|
||||
namespace WatchIt.Website.Services.Client.Genders;
|
||||
|
||||
public class GendersWebAPIService : BaseWebAPIService, IGendersWebAPIService
|
||||
public class GendersClientService : BaseClientService, IGendersClientService
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
@@ -18,7 +17,7 @@ public class GendersWebAPIService : BaseWebAPIService, IGendersWebAPIService
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public GendersWebAPIService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
public GendersClientService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
{
|
||||
_httpClientService = httpClientService;
|
||||
_configurationService = configurationService;
|
||||
@@ -1,8 +1,8 @@
|
||||
using WatchIt.Common.Model.Genders;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Genders;
|
||||
namespace WatchIt.Website.Services.Client.Genders;
|
||||
|
||||
public interface IGendersWebAPIService
|
||||
public interface IGendersClientService
|
||||
{
|
||||
Task GetAllGenders(GenderQueryParameters? query = null, Action<IEnumerable<GenderResponse>>? successAction = null);
|
||||
Task GetGender(long id, Action<GenderResponse>? successAction = null, Action? notFoundAction = null);
|
||||
@@ -4,9 +4,9 @@ using WatchIt.Common.Model.Photos;
|
||||
using WatchIt.Common.Model.Rating;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Media;
|
||||
namespace WatchIt.Website.Services.Client.Media;
|
||||
|
||||
public interface IMediaWebAPIService
|
||||
public interface IMediaClientService
|
||||
{
|
||||
Task GetAllMedia(MediaQueryParameters? query = null, Action<IEnumerable<MediaResponse>>? successAction = null);
|
||||
Task GetMedia(long mediaId, Action<MediaResponse>? successAction = null, Action? notFoundAction = null);
|
||||
@@ -4,13 +4,11 @@ using WatchIt.Common.Model.Photos;
|
||||
using WatchIt.Common.Model.Rating;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
using WatchIt.Common.Services.HttpClient;
|
||||
using WatchIt.Website.Services.Utility.Configuration;
|
||||
using WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
using WatchIt.Website.Services.WebAPI.Common;
|
||||
using WatchIt.Website.Services.Configuration;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Media;
|
||||
namespace WatchIt.Website.Services.Client.Media;
|
||||
|
||||
public class MediaWebAPIService : BaseWebAPIService, IMediaWebAPIService
|
||||
public class MediaClientService : BaseClientService, IMediaClientService
|
||||
{
|
||||
#region FIELDS
|
||||
|
||||
@@ -22,7 +20,7 @@ public class MediaWebAPIService : BaseWebAPIService, IMediaWebAPIService
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public MediaWebAPIService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
public MediaClientService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
{
|
||||
_httpClientService = httpClientService;
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using WatchIt.Common.Model.Movies;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Movies;
|
||||
namespace WatchIt.Website.Services.Client.Movies;
|
||||
|
||||
public interface IMoviesWebAPIService
|
||||
public interface IMoviesClientService
|
||||
{
|
||||
Task GetAllMovies(MovieQueryParameters? query = null, Action<IEnumerable<MovieResponse>>? successAction = null);
|
||||
Task PostMovie(MovieRequest data, Action<MovieResponse>? successAction = null, Action<IDictionary<string, string[]>>? badRequestAction = null, Action? unauthorizedAction = null, Action? forbiddenAction = null);
|
||||
@@ -3,12 +3,11 @@ using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using WatchIt.Common.Model.Movies;
|
||||
using WatchIt.Common.Services.HttpClient;
|
||||
using WatchIt.Website.Services.Utility.Configuration;
|
||||
using WatchIt.Website.Services.WebAPI.Common;
|
||||
using WatchIt.Website.Services.Configuration;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Movies;
|
||||
namespace WatchIt.Website.Services.Client.Movies;
|
||||
|
||||
public class MoviesWebAPIService : BaseWebAPIService, IMoviesWebAPIService
|
||||
public class MoviesClientService : BaseClientService, IMoviesClientService
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
@@ -21,7 +20,7 @@ public class MoviesWebAPIService : BaseWebAPIService, IMoviesWebAPIService
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public MoviesWebAPIService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
public MoviesClientService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
{
|
||||
_httpClientService = httpClientService;
|
||||
_configurationService = configurationService;
|
||||
@@ -2,9 +2,9 @@ using WatchIt.Common.Model.Persons;
|
||||
using WatchIt.Common.Model.Rating;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Persons;
|
||||
namespace WatchIt.Website.Services.Client.Persons;
|
||||
|
||||
public interface IPersonsWebAPIService
|
||||
public interface IPersonsClientService
|
||||
{
|
||||
Task GetAllPersons(PersonQueryParameters? query = null, Action<IEnumerable<PersonResponse>>? successAction = null);
|
||||
Task GetPerson(long id, Action<PersonResponse>? successAction = null, Action? notFoundAction = null);
|
||||
@@ -5,12 +5,11 @@ using WatchIt.Common.Model.Persons;
|
||||
using WatchIt.Common.Model.Rating;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
using WatchIt.Common.Services.HttpClient;
|
||||
using WatchIt.Website.Services.Utility.Configuration;
|
||||
using WatchIt.Website.Services.WebAPI.Common;
|
||||
using WatchIt.Website.Services.Configuration;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Persons;
|
||||
namespace WatchIt.Website.Services.Client.Persons;
|
||||
|
||||
public class PersonsWebAPIService : BaseWebAPIService, IPersonsWebAPIService
|
||||
public class PersonsClientService : BaseClientService, IPersonsClientService
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
@@ -23,7 +22,7 @@ public class PersonsWebAPIService : BaseWebAPIService, IPersonsWebAPIService
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public PersonsWebAPIService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
public PersonsClientService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
{
|
||||
_httpClientService = httpClientService;
|
||||
_configurationService = configurationService;
|
||||
@@ -1,8 +1,8 @@
|
||||
using WatchIt.Common.Model.Photos;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Photos;
|
||||
namespace WatchIt.Website.Services.Client.Photos;
|
||||
|
||||
public interface IPhotosWebAPIService
|
||||
public interface IPhotosClientService
|
||||
{
|
||||
Task GetPhotoRandomBackground(Action<PhotoResponse>? successAction = null, Action? notFoundAction = null);
|
||||
Task DeletePhoto(Guid id, Action? successAction = null, Action? unauthorizedAction = null, Action? forbiddenAction = null, Action? notFoundAction = null);
|
||||
@@ -1,11 +1,10 @@
|
||||
using WatchIt.Common.Model.Photos;
|
||||
using WatchIt.Common.Services.HttpClient;
|
||||
using WatchIt.Website.Services.Utility.Configuration;
|
||||
using WatchIt.Website.Services.WebAPI.Common;
|
||||
using WatchIt.Website.Services.Configuration;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Photos;
|
||||
namespace WatchIt.Website.Services.Client.Photos;
|
||||
|
||||
public class PhotosWebAPIService : BaseWebAPIService, IPhotosWebAPIService
|
||||
public class PhotosClientService : BaseClientService, IPhotosClientService
|
||||
{
|
||||
#region FIELDS
|
||||
|
||||
@@ -17,7 +16,7 @@ public class PhotosWebAPIService : BaseWebAPIService, IPhotosWebAPIService
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public PhotosWebAPIService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
public PhotosClientService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
{
|
||||
_httpClientService = httpClientService;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using WatchIt.Common.Model.Rating;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Roles;
|
||||
namespace WatchIt.Website.Services.Client.Roles;
|
||||
|
||||
public interface IRolesWebAPIService
|
||||
public interface IRolesClientService
|
||||
{
|
||||
Task GetActorRole(Guid id, Action<ActorRoleResponse>? successAction = null, Action? notFoundAction = null);
|
||||
Task PutActorRole(Guid id, ActorRoleUniversalRequest data, Action? successAction = null, Action<IDictionary<string, string[]>>? badRequestAction = null, Action? unauthorizedAction = null, Action? forbiddenAction = null, Action? notFoundAction = null);
|
||||
@@ -1,12 +1,11 @@
|
||||
using WatchIt.Common.Model.Rating;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
using WatchIt.Common.Services.HttpClient;
|
||||
using WatchIt.Website.Services.Utility.Configuration;
|
||||
using WatchIt.Website.Services.WebAPI.Common;
|
||||
using WatchIt.Website.Services.Configuration;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Roles;
|
||||
namespace WatchIt.Website.Services.Client.Roles;
|
||||
|
||||
public class RolesWebAPIService : BaseWebAPIService, IRolesWebAPIService
|
||||
public class RolesClientService : BaseClientService, IRolesClientService
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
@@ -18,7 +17,7 @@ public class RolesWebAPIService : BaseWebAPIService, IRolesWebAPIService
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public RolesWebAPIService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
public RolesClientService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
{
|
||||
_httpClientService = httpClientService;
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using WatchIt.Common.Model.Series;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Series;
|
||||
namespace WatchIt.Website.Services.Client.Series;
|
||||
|
||||
public interface ISeriesWebAPIService
|
||||
public interface ISeriesClientService
|
||||
{
|
||||
Task GetAllSeries(SeriesQueryParameters? query = null, Action<IEnumerable<SeriesResponse>>? successAction = null);
|
||||
Task GetSeries(long id, Action<SeriesResponse>? successAction = null, Action? notFoundAction = null);
|
||||
@@ -1,12 +1,11 @@
|
||||
using System.Text;
|
||||
using WatchIt.Common.Model.Series;
|
||||
using WatchIt.Common.Services.HttpClient;
|
||||
using WatchIt.Website.Services.Utility.Configuration;
|
||||
using WatchIt.Website.Services.WebAPI.Common;
|
||||
using WatchIt.Website.Services.Configuration;
|
||||
|
||||
namespace WatchIt.Website.Services.WebAPI.Series;
|
||||
namespace WatchIt.Website.Services.Client.Series;
|
||||
|
||||
public class SeriesWebAPIService : BaseWebAPIService, ISeriesWebAPIService
|
||||
public class SeriesClientService : BaseClientService, ISeriesClientService
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
@@ -19,7 +18,7 @@ public class SeriesWebAPIService : BaseWebAPIService, ISeriesWebAPIService
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public SeriesWebAPIService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
public SeriesClientService(IHttpClientService httpClientService, IConfigurationService configurationService) : base(configurationService)
|
||||
{
|
||||
_httpClientService = httpClientService;
|
||||
_configurationService = configurationService;
|
||||
@@ -0,0 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\WatchIt.Common\WatchIt.Common.Model\WatchIt.Common.Model.csproj" />
|
||||
<ProjectReference Include="..\..\..\WatchIt.Common\WatchIt.Common.Services\WatchIt.Common.Services.HttpClient\WatchIt.Common.Services.HttpClient.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.Tokens\WatchIt.Website.Services.Tokens.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.Utility\WatchIt.Website.Services.Configuration\WatchIt.Website.Services.Configuration.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,6 +1,6 @@
|
||||
using WatchIt.Common.Model.Accounts;
|
||||
|
||||
namespace WatchIt.Website.Services.Utility.Tokens;
|
||||
namespace WatchIt.Website.Services.Tokens;
|
||||
|
||||
public interface ITokensService
|
||||
{
|
||||
@@ -2,9 +2,9 @@
|
||||
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using WatchIt.Common.Model.Accounts;
|
||||
using WatchIt.Website.Services.Utility.Configuration;
|
||||
using WatchIt.Website.Services.Configuration;
|
||||
|
||||
namespace WatchIt.Website.Services.Utility.Tokens;
|
||||
namespace WatchIt.Website.Services.Tokens;
|
||||
|
||||
public class TokensService : ITokensService
|
||||
{
|
||||
@@ -4,12 +4,11 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>WatchIt.Website.Services.Utility.Token</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Model\WatchIt.Common.Model.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.Utility.Configuration\WatchIt.Website.Services.Utility.Configuration.csproj" />
|
||||
<ProjectReference Include="..\..\..\WatchIt.Common\WatchIt.Common.Model\WatchIt.Common.Model.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.Utility\WatchIt.Website.Services.Configuration\WatchIt.Website.Services.Configuration.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
using WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
namespace WatchIt.Website.Services.Utility.Configuration;
|
||||
namespace WatchIt.Website.Services.Configuration;
|
||||
|
||||
public class ConfigurationService(IConfiguration configuration) : IConfigurationService
|
||||
{
|
||||
@@ -0,0 +1,8 @@
|
||||
using WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
namespace WatchIt.Website.Services.Configuration;
|
||||
|
||||
public interface IConfigurationService
|
||||
{
|
||||
ConfigurationData Data { get; }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Accounts
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class ConfigurationData
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Endpoints
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Genders
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Genres
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class LogLevel
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Logging
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Media
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Movies
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Persons
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Photos
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Roles
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Series
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class StorageKeys
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
namespace WatchIt.Website.Services.Configuration.Model;
|
||||
|
||||
public class Style
|
||||
{
|
||||
@@ -1,19 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.5.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\WatchIt.Website.Services.WebAPI\WatchIt.Website.Services.WebAPI.Accounts\WatchIt.Website.Services.WebAPI.Accounts.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.Utility.Tokens\WatchIt.Website.Services.Utility.Tokens.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,8 +0,0 @@
|
||||
using WatchIt.Website.Services.Utility.Configuration.Model;
|
||||
|
||||
namespace WatchIt.Website.Services.Utility.Configuration;
|
||||
|
||||
public interface IConfigurationService
|
||||
{
|
||||
ConfigurationData Data { get; }
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Model\WatchIt.Common.Model.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Services\WatchIt.Common.Services.HttpClient\WatchIt.Common.Services.HttpClient.csproj" />
|
||||
<ProjectReference Include="..\..\WatchIt.Website.Services.Utility\WatchIt.Website.Services.Utility.Configuration\WatchIt.Website.Services.Utility.Configuration.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.WebAPI.Common\WatchIt.Website.Services.WebAPI.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,15 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.WebAPI\WatchIt.WebAPI.Services\WatchIt.WebAPI.Services.Utility\WatchIt.WebAPI.Services.Utility.Configuration\WatchIt.WebAPI.Services.Utility.Configuration.csproj" />
|
||||
<ProjectReference Include="..\..\WatchIt.Website.Services.Utility\WatchIt.Website.Services.Utility.Configuration\WatchIt.Website.Services.Utility.Configuration.csproj" />
|
||||
<ProjectReference Include="..\..\WatchIt.Website.Services.Utility\WatchIt.Website.Services.Utility.Tokens\WatchIt.Website.Services.Utility.Tokens.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,14 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Services\WatchIt.Common.Services.HttpClient\WatchIt.Common.Services.HttpClient.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.WebAPI.Common\WatchIt.Website.Services.WebAPI.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,9 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,16 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Model\WatchIt.Common.Model.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Services\WatchIt.Common.Services.HttpClient\WatchIt.Common.Services.HttpClient.csproj" />
|
||||
<ProjectReference Include="..\..\WatchIt.Website.Services.Utility\WatchIt.Website.Services.Utility.Configuration\WatchIt.Website.Services.Utility.Configuration.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.WebAPI.Common\WatchIt.Website.Services.WebAPI.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,23 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.AspNetCore.Components">
|
||||
<HintPath>..\..\..\..\..\..\..\..\Program Files\dotnet\shared\Microsoft.AspNetCore.App\8.0.2\Microsoft.AspNetCore.Components.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Model\WatchIt.Common.Model.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Services\WatchIt.Common.Services.HttpClient\WatchIt.Common.Services.HttpClient.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.WebAPI\WatchIt.WebAPI.Services\WatchIt.WebAPI.Services.Utility\WatchIt.WebAPI.Services.Utility.Configuration\WatchIt.WebAPI.Services.Utility.Configuration.csproj" />
|
||||
<ProjectReference Include="..\..\WatchIt.Website.Services.Utility\WatchIt.Website.Services.Utility.Configuration\WatchIt.Website.Services.Utility.Configuration.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.WebAPI.Common\WatchIt.Website.Services.WebAPI.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,14 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Services\WatchIt.Common.Services.HttpClient\WatchIt.Common.Services.HttpClient.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.WebAPI.Common\WatchIt.Website.Services.WebAPI.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,15 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Services\WatchIt.Common.Services.HttpClient\WatchIt.Common.Services.HttpClient.csproj" />
|
||||
<ProjectReference Include="..\..\WatchIt.Website.Services.Utility\WatchIt.Website.Services.Utility.Configuration\WatchIt.Website.Services.Utility.Configuration.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.WebAPI.Common\WatchIt.Website.Services.WebAPI.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,14 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Services\WatchIt.Common.Services.HttpClient\WatchIt.Common.Services.HttpClient.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.WebAPI.Common\WatchIt.Website.Services.WebAPI.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,14 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\WatchIt.Common\WatchIt.Common.Services\WatchIt.Common.Services.HttpClient\WatchIt.Common.Services.HttpClient.csproj" />
|
||||
<ProjectReference Include="..\WatchIt.Website.Services.WebAPI.Common\WatchIt.Website.Services.WebAPI.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model;
|
||||
using WatchIt.Common.Model.Rating;
|
||||
using WatchIt.Website.Services.Utility.Authentication;
|
||||
using WatchIt.Website.Services.Authentication;
|
||||
|
||||
namespace WatchIt.Website.Components.Common.Subcomponents;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Genders;
|
||||
using WatchIt.Common.Model.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Genders;
|
||||
using WatchIt.Website.Services.Client.Genders;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.DatabasePage.Subcomponents;
|
||||
|
||||
@@ -9,7 +9,7 @@ public partial class PersonsFilterFormComponent : FilterFormComponent<PersonResp
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IGendersWebAPIService GendersWebAPIService { get; set; } = default!;
|
||||
[Inject] private IGendersClientService GendersClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -34,7 +34,7 @@ public partial class PersonsFilterFormComponent : FilterFormComponent<PersonResp
|
||||
// STEP 0
|
||||
endTasks.AddRange(
|
||||
[
|
||||
GendersWebAPIService.GetAllGenders(successAction: data => _genders = data)
|
||||
GendersClientService.GetAllGenders(successAction: data => _genders = data)
|
||||
]);
|
||||
|
||||
// END
|
||||
|
||||
@@ -2,9 +2,9 @@ using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Media;
|
||||
using WatchIt.Common.Model.Persons;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Roles;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Roles;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.MediaEditPage.Panels;
|
||||
|
||||
@@ -12,9 +12,9 @@ public partial class MediaActorRolesEditPanelComponent : ComponentBase
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IRolesWebAPIService RolesWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] private IRolesClientService RolesClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -62,8 +62,8 @@ public partial class MediaActorRolesEditPanelComponent : ComponentBase
|
||||
{
|
||||
endTasks.AddRange(
|
||||
[
|
||||
MediaWebAPIService.GetMediaAllActorRoles(Id.Value, successAction: data => _roles = data.ToDictionary(x => x.Id, x => (x, false))),
|
||||
RolesWebAPIService.GetAllActorRoleTypes(successAction: data => _roleTypes = data.ToDictionary(x => x.Id, x => x.Name)),
|
||||
MediaClientService.GetMediaAllActorRoles(Id.Value, successAction: data => _roles = data.ToDictionary(x => x.Id, x => (x, false))),
|
||||
RolesClientService.GetAllActorRoleTypes(successAction: data => _roleTypes = data.ToDictionary(x => x.Id, x => x.Name)),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -120,11 +120,11 @@ public partial class MediaActorRolesEditPanelComponent : ComponentBase
|
||||
_saving = true;
|
||||
if (_editedId.HasValue)
|
||||
{
|
||||
await RolesWebAPIService.PutActorRole(_editedId.Value, _editedModel as ActorRoleUniversalRequest, SuccessPut, BadRequest, Unauthorized);
|
||||
await RolesClientService.PutActorRole(_editedId.Value, _editedModel as ActorRoleUniversalRequest, SuccessPut, BadRequest, Unauthorized);
|
||||
}
|
||||
else
|
||||
{
|
||||
await MediaWebAPIService.PostMediaActorRole(Id!.Value, _editedModel as ActorRoleMediaRequest, SuccessPost, BadRequest, Unauthorized);
|
||||
await MediaClientService.PostMediaActorRole(Id!.Value, _editedModel as ActorRoleMediaRequest, SuccessPost, BadRequest, Unauthorized);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ public partial class MediaActorRolesEditPanelComponent : ComponentBase
|
||||
private async Task Delete(Guid id)
|
||||
{
|
||||
_roles[id] = (_roles[id].Data, true);
|
||||
await RolesWebAPIService.DeleteActorRole(id, () => _roles.Remove(id));
|
||||
await RolesClientService.DeleteActorRole(id, () => _roles.Remove(id));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2,9 +2,9 @@ using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Media;
|
||||
using WatchIt.Common.Model.Persons;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Roles;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Roles;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.MediaEditPage.Panels;
|
||||
|
||||
@@ -12,9 +12,9 @@ public partial class MediaCreatorRolesEditPanelComponent : ComponentBase
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IRolesWebAPIService RolesWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] private IRolesClientService RolesClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -62,8 +62,8 @@ public partial class MediaCreatorRolesEditPanelComponent : ComponentBase
|
||||
{
|
||||
endTasks.AddRange(
|
||||
[
|
||||
MediaWebAPIService.GetMediaAllCreatorRoles(Id.Value, successAction: data => _roles = data.ToDictionary(x => x.Id, x => (x, false))),
|
||||
RolesWebAPIService.GetAllCreatorRoleTypes(successAction: data => _roleTypes = data.ToDictionary(x => x.Id, x => x.Name)),
|
||||
MediaClientService.GetMediaAllCreatorRoles(Id.Value, successAction: data => _roles = data.ToDictionary(x => x.Id, x => (x, false))),
|
||||
RolesClientService.GetAllCreatorRoleTypes(successAction: data => _roleTypes = data.ToDictionary(x => x.Id, x => x.Name)),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -119,11 +119,11 @@ public partial class MediaCreatorRolesEditPanelComponent : ComponentBase
|
||||
_saving = true;
|
||||
if (_editedId.HasValue)
|
||||
{
|
||||
await RolesWebAPIService.PutCreatorRole(_editedId.Value, _editedModel as CreatorRoleUniversalRequest, SuccessPut, BadRequest, Unauthorized);
|
||||
await RolesClientService.PutCreatorRole(_editedId.Value, _editedModel as CreatorRoleUniversalRequest, SuccessPut, BadRequest, Unauthorized);
|
||||
}
|
||||
else
|
||||
{
|
||||
await MediaWebAPIService.PostMediaCreatorRole(Id!.Value, _editedModel as CreatorRoleMediaRequest, SuccessPost, BadRequest, Unauthorized);
|
||||
await MediaClientService.PostMediaCreatorRole(Id!.Value, _editedModel as CreatorRoleMediaRequest, SuccessPost, BadRequest, Unauthorized);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public partial class MediaCreatorRolesEditPanelComponent : ComponentBase
|
||||
private async Task Delete(Guid id)
|
||||
{
|
||||
_roles[id] = (_roles[id].Data, true);
|
||||
await RolesWebAPIService.DeleteCreatorRole(id, () => _roles.Remove(id));
|
||||
await RolesClientService.DeleteCreatorRole(id, () => _roles.Remove(id));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
TQuery="ActorRoleMediaQueryParameters"
|
||||
TRoleParent="PersonResponse"
|
||||
Id="@(Id)"
|
||||
GetRolesAction="@(MediaWebAPIService.GetMediaAllActorRoles)"
|
||||
GetRolesAction="@(MediaClientService.GetMediaAllActorRoles)"
|
||||
NameSource="@((_, parent) => parent.Name)"
|
||||
AdditionalInfoSource="@((item, _) => $" as {item.Name}")"
|
||||
GetRoleParentMethod="@((id, action) => PersonsWebAPIService.GetPerson(id, action))"
|
||||
GetRoleParentMethod="@((id, action) => PersonsClientService.GetPerson(id, action))"
|
||||
ParentItemIdSource="@(item => item.PersonId)"
|
||||
ParentUrlTemplate="/person/{0}"
|
||||
PosterPlaceholder="/assets/person_poster.png"
|
||||
PosterDownloadingTask="@((id, action) => PersonsWebAPIService.GetPersonPhoto(id, action))"
|
||||
GetGlobalRatingMethod="@((id, action) => RolesWebAPIService.GetActorRoleRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, actionSuccess, actionNotFound) => RolesWebAPIService.GetActorRoleRatingByUser(id, userId, actionSuccess, actionNotFound))"
|
||||
PutRatingMethod="@((id, request) => RolesWebAPIService.PutActorRoleRating(id, request))"
|
||||
DeleteRatingMethod="@(id => RolesWebAPIService.DeleteActorRoleRating(id))"/>
|
||||
PosterDownloadingTask="@((id, action) => PersonsClientService.GetPersonPhoto(id, action))"
|
||||
GetGlobalRatingMethod="@((id, action) => RolesClientService.GetActorRoleRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, actionSuccess, actionNotFound) => RolesClientService.GetActorRoleRatingByUser(id, userId, actionSuccess, actionNotFound))"
|
||||
PutRatingMethod="@((id, request) => RolesClientService.PutActorRoleRating(id, request))"
|
||||
DeleteRatingMethod="@(id => RolesClientService.DeleteActorRoleRating(id))"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,8 +1,8 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Website.Services.Utility.Authentication;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Roles;
|
||||
using WatchIt.Website.Services.Authentication;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Roles;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.MediaPage.Panels;
|
||||
|
||||
@@ -10,9 +10,9 @@ public partial class MediaActorRolesPanelComponent : ComponentBase
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IRolesWebAPIService RolesWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
[Inject] private IRolesClientService RolesClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -22,17 +22,17 @@
|
||||
TRoleParent="PersonResponse"
|
||||
Id="@(Id)"
|
||||
Query="@(_query)"
|
||||
GetRolesAction="@(MediaWebAPIService.GetMediaAllCreatorRoles)"
|
||||
GetRolesAction="@(MediaClientService.GetMediaAllCreatorRoles)"
|
||||
NameSource="@((_, parent) => parent.Name)"
|
||||
GetRoleParentMethod="@((id, action) => PersonsWebAPIService.GetPerson(id, action))"
|
||||
GetRoleParentMethod="@((id, action) => PersonsClientService.GetPerson(id, action))"
|
||||
ParentItemIdSource="@(item => item.PersonId)"
|
||||
ParentUrlTemplate="/person/{0}"
|
||||
PosterPlaceholder="/assets/person_poster.png"
|
||||
PosterDownloadingTask="@((id, action) => PersonsWebAPIService.GetPersonPhoto(id, action))"
|
||||
GetGlobalRatingMethod="@((id, action) => RolesWebAPIService.GetCreatorRoleRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, actionSuccess, actionNotFound) => RolesWebAPIService.GetCreatorRoleRatingByUser(id, userId, actionSuccess, actionNotFound))"
|
||||
PutRatingMethod="@((id, request) => RolesWebAPIService.PutCreatorRoleRating(id, request))"
|
||||
DeleteRatingMethod="@((id) => RolesWebAPIService.DeleteCreatorRoleRating(id))"/>
|
||||
PosterDownloadingTask="@((id, action) => PersonsClientService.GetPersonPhoto(id, action))"
|
||||
GetGlobalRatingMethod="@((id, action) => RolesClientService.GetCreatorRoleRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, actionSuccess, actionNotFound) => RolesClientService.GetCreatorRoleRatingByUser(id, userId, actionSuccess, actionNotFound))"
|
||||
PutRatingMethod="@((id, request) => RolesClientService.PutCreatorRoleRating(id, request))"
|
||||
DeleteRatingMethod="@((id) => RolesClientService.DeleteCreatorRoleRating(id))"/>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2,10 +2,10 @@ using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Persons;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
using WatchIt.Website.Components.Common.Subcomponents;
|
||||
using WatchIt.Website.Services.Utility.Authentication;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Roles;
|
||||
using WatchIt.Website.Services.Authentication;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Roles;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.MediaPage.Panels;
|
||||
|
||||
@@ -13,9 +13,9 @@ public partial class MediaCreatorRolesPanelComponent : ComponentBase
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IRolesWebAPIService RolesWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] private IRolesClientService RolesClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -54,7 +54,7 @@ public partial class MediaCreatorRolesPanelComponent : ComponentBase
|
||||
// STEP 0
|
||||
endTasks.AddRange(
|
||||
[
|
||||
RolesWebAPIService.GetAllCreatorRoleTypes(successAction: data => _roleTypes = data)
|
||||
RolesClientService.GetAllCreatorRoleTypes(successAction: data => _roleTypes = data)
|
||||
]);
|
||||
|
||||
// END
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Media;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Roles;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Roles;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.PersonEditPage.Panels;
|
||||
|
||||
@@ -11,9 +11,9 @@ public partial class PersonActorRolesEditPanelComponent : ComponentBase
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IRolesWebAPIService RolesWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] private IRolesClientService RolesClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -61,8 +61,8 @@ public partial class PersonActorRolesEditPanelComponent : ComponentBase
|
||||
{
|
||||
endTasks.AddRange(
|
||||
[
|
||||
PersonsWebAPIService.GetPersonAllActorRoles(Id.Value, successAction: data => _roles = data.ToDictionary(x => x.Id, x => (x, false))),
|
||||
RolesWebAPIService.GetAllActorRoleTypes(successAction: data => _roleTypes = data.ToDictionary(x => x.Id, x => x.Name)),
|
||||
PersonsClientService.GetPersonAllActorRoles(Id.Value, successAction: data => _roles = data.ToDictionary(x => x.Id, x => (x, false))),
|
||||
RolesClientService.GetAllActorRoleTypes(successAction: data => _roleTypes = data.ToDictionary(x => x.Id, x => x.Name)),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -122,11 +122,11 @@ public partial class PersonActorRolesEditPanelComponent : ComponentBase
|
||||
_saving = true;
|
||||
if (_editedId.HasValue)
|
||||
{
|
||||
await RolesWebAPIService.PutActorRole(_editedId.Value, _editedModel as ActorRoleUniversalRequest, SuccessPut, BadRequest, Unauthorized);
|
||||
await RolesClientService.PutActorRole(_editedId.Value, _editedModel as ActorRoleUniversalRequest, SuccessPut, BadRequest, Unauthorized);
|
||||
}
|
||||
else
|
||||
{
|
||||
await PersonsWebAPIService.PostPersonActorRole(Id!.Value, _editedModel as ActorRolePersonRequest, SuccessPost, BadRequest, Unauthorized);
|
||||
await PersonsClientService.PostPersonActorRole(Id!.Value, _editedModel as ActorRolePersonRequest, SuccessPost, BadRequest, Unauthorized);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public partial class PersonActorRolesEditPanelComponent : ComponentBase
|
||||
private async Task Delete(Guid id)
|
||||
{
|
||||
_roles[id] = (_roles[id].Data, true);
|
||||
await RolesWebAPIService.DeleteActorRole(id, () => _roles.Remove(id));
|
||||
await RolesClientService.DeleteActorRole(id, () => _roles.Remove(id));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Media;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Roles;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Roles;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.PersonEditPage.Panels;
|
||||
|
||||
@@ -11,9 +11,9 @@ public partial class PersonCreatorRolesEditPanelComponent : ComponentBase
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IRolesWebAPIService RolesWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] private IRolesClientService RolesClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -61,8 +61,8 @@ public partial class PersonCreatorRolesEditPanelComponent : ComponentBase
|
||||
{
|
||||
endTasks.AddRange(
|
||||
[
|
||||
PersonsWebAPIService.GetPersonAllCreatorRoles(Id.Value, successAction: data => _roles = data.ToDictionary(x => x.Id, x => (x, false))),
|
||||
RolesWebAPIService.GetAllCreatorRoleTypes(successAction: data => _roleTypes = data.ToDictionary(x => x.Id, x => x.Name)),
|
||||
PersonsClientService.GetPersonAllCreatorRoles(Id.Value, successAction: data => _roles = data.ToDictionary(x => x.Id, x => (x, false))),
|
||||
RolesClientService.GetAllCreatorRoleTypes(successAction: data => _roleTypes = data.ToDictionary(x => x.Id, x => x.Name)),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -121,11 +121,11 @@ public partial class PersonCreatorRolesEditPanelComponent : ComponentBase
|
||||
_saving = true;
|
||||
if (_editedId.HasValue)
|
||||
{
|
||||
await RolesWebAPIService.PutCreatorRole(_editedId.Value, _editedModel as CreatorRoleUniversalRequest, SuccessPut, BadRequest, Unauthorized);
|
||||
await RolesClientService.PutCreatorRole(_editedId.Value, _editedModel as CreatorRoleUniversalRequest, SuccessPut, BadRequest, Unauthorized);
|
||||
}
|
||||
else
|
||||
{
|
||||
await PersonsWebAPIService.PostPersonCreatorRole(Id!.Value, _editedModel as CreatorRolePersonRequest, SuccessPost, BadRequest, Unauthorized);
|
||||
await PersonsClientService.PostPersonCreatorRole(Id!.Value, _editedModel as CreatorRolePersonRequest, SuccessPost, BadRequest, Unauthorized);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public partial class PersonCreatorRolesEditPanelComponent : ComponentBase
|
||||
private async Task Delete(Guid id)
|
||||
{
|
||||
_roles[id] = (_roles[id].Data, true);
|
||||
await RolesWebAPIService.DeleteCreatorRole(id, () => _roles.Remove(id));
|
||||
await RolesClientService.DeleteCreatorRole(id, () => _roles.Remove(id));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Genders;
|
||||
using WatchIt.Common.Model.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Genders;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.Client.Genders;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.PersonEditPage.Panels;
|
||||
|
||||
@@ -11,8 +11,8 @@ public partial class PersonEditFormPanelComponent : ComponentBase
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IGendersWebAPIService GendersWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
[Inject] private IGendersClientService GendersClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -52,13 +52,13 @@ public partial class PersonEditFormPanelComponent : ComponentBase
|
||||
// STEP 0
|
||||
endTasks.AddRange(
|
||||
[
|
||||
GendersWebAPIService.GetAllGenders(successAction: data => _genders = data)
|
||||
GendersClientService.GetAllGenders(successAction: data => _genders = data)
|
||||
]);
|
||||
if (Id.HasValue)
|
||||
{
|
||||
endTasks.AddRange(
|
||||
[
|
||||
PersonsWebAPIService.GetPerson(Id.Value, data => _person = new PersonRequest(data))
|
||||
PersonsClientService.GetPerson(Id.Value, data => _person = new PersonRequest(data))
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -98,11 +98,11 @@ public partial class PersonEditFormPanelComponent : ComponentBase
|
||||
_saving = true;
|
||||
if (Id.HasValue)
|
||||
{
|
||||
await PersonsWebAPIService.PutPerson(Id.Value, _person, PutSuccess, BadRequest, AuthError, AuthError);
|
||||
await PersonsClientService.PutPerson(Id.Value, _person, PutSuccess, BadRequest, AuthError, AuthError);
|
||||
}
|
||||
else
|
||||
{
|
||||
await PersonsWebAPIService.PostPerson(_person, PostSuccess, BadRequest, AuthError, AuthError);
|
||||
await PersonsClientService.PostPerson(_person, PostSuccess, BadRequest, AuthError, AuthError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,18 +10,18 @@
|
||||
TQuery="ActorRolePersonQueryParameters"
|
||||
TRoleParent="MediaResponse"
|
||||
Id="@(Id)"
|
||||
GetRolesAction="@(PersonsWebAPIService.GetPersonAllActorRoles)"
|
||||
GetRolesAction="@(PersonsClientService.GetPersonAllActorRoles)"
|
||||
NameSource="@((_, parent) => parent.Title)"
|
||||
AdditionalInfoSource="@((item, _) => $" as {item.Name}")"
|
||||
GetRoleParentMethod="@((id, action) => MediaWebAPIService.GetMedia(id, action))"
|
||||
GetRoleParentMethod="@((id, action) => MediaClientService.GetMedia(id, action))"
|
||||
ParentItemIdSource="@(item => item.MediaId)"
|
||||
ParentUrlTemplate="/media/{0}"
|
||||
PosterPlaceholder="/assets/media_poster.png"
|
||||
PosterDownloadingTask="@((id, action) => MediaWebAPIService.GetMediaPoster(id, action))"
|
||||
GetGlobalRatingMethod="@((id, action) => RolesWebAPIService.GetActorRoleRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, actionSuccess, actionNotFound) => RolesWebAPIService.GetActorRoleRatingByUser(id, userId, actionSuccess, actionNotFound))"
|
||||
PutRatingMethod="@((id, request) => RolesWebAPIService.PutActorRoleRating(id, request))"
|
||||
DeleteRatingMethod="@(id => RolesWebAPIService.DeleteActorRoleRating(id))"
|
||||
PosterDownloadingTask="@((id, action) => MediaClientService.GetMediaPoster(id, action))"
|
||||
GetGlobalRatingMethod="@((id, action) => RolesClientService.GetActorRoleRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, actionSuccess, actionNotFound) => RolesClientService.GetActorRoleRatingByUser(id, userId, actionSuccess, actionNotFound))"
|
||||
PutRatingMethod="@((id, request) => RolesClientService.PutActorRoleRating(id, request))"
|
||||
DeleteRatingMethod="@(id => RolesClientService.DeleteActorRoleRating(id))"
|
||||
OnRatingChanged="@(OnRatingChanged)"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Roles;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Roles;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.PersonPage.Panels;
|
||||
|
||||
@@ -9,9 +9,9 @@ public partial class PersonActorRolesPanelComponent : ComponentBase
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IRolesWebAPIService RolesWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
[Inject] private IRolesClientService RolesClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -22,17 +22,17 @@
|
||||
TRoleParent="MediaResponse"
|
||||
Id="@(Id)"
|
||||
Query="@(_query)"
|
||||
GetRolesAction="@(PersonsWebAPIService.GetPersonAllCreatorRoles)"
|
||||
GetRolesAction="@(PersonsClientService.GetPersonAllCreatorRoles)"
|
||||
NameSource="@((_, parent) => parent.Title)"
|
||||
GetRoleParentMethod="@((id, action) => MediaWebAPIService.GetMedia(id, action))"
|
||||
GetRoleParentMethod="@((id, action) => MediaClientService.GetMedia(id, action))"
|
||||
ParentItemIdSource="@(item => item.MediaId)"
|
||||
ParentUrlTemplate="/media/{0}"
|
||||
PosterPlaceholder="/assets/media_poster.png"
|
||||
PosterDownloadingTask="@((id, action) => MediaWebAPIService.GetMediaPoster(id, action))"
|
||||
GetGlobalRatingMethod="@((id, action) => RolesWebAPIService.GetCreatorRoleRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, actionSuccess, actionNotFound) => RolesWebAPIService.GetCreatorRoleRatingByUser(id, userId, actionSuccess, actionNotFound))"
|
||||
PutRatingMethod="@((id, request) => RolesWebAPIService.PutCreatorRoleRating(id, request))"
|
||||
DeleteRatingMethod="@((id) => RolesWebAPIService.DeleteCreatorRoleRating(id))"
|
||||
PosterDownloadingTask="@((id, action) => MediaClientService.GetMediaPoster(id, action))"
|
||||
GetGlobalRatingMethod="@((id, action) => RolesClientService.GetCreatorRoleRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, actionSuccess, actionNotFound) => RolesClientService.GetCreatorRoleRatingByUser(id, userId, actionSuccess, actionNotFound))"
|
||||
PutRatingMethod="@((id, request) => RolesClientService.PutCreatorRoleRating(id, request))"
|
||||
DeleteRatingMethod="@((id) => RolesClientService.DeleteCreatorRoleRating(id))"
|
||||
OnRatingChanged="@(OnRatingChanged)"/>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Media;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
using WatchIt.Website.Components.Common.Subcomponents;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Roles;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Roles;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.PersonPage.Panels;
|
||||
|
||||
@@ -12,9 +12,9 @@ public partial class PersonCreatorRolesPanelComponent : ComponentBase
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IRolesWebAPIService RolesWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] private IRolesClientService RolesClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -54,7 +54,7 @@ public partial class PersonCreatorRolesPanelComponent : ComponentBase
|
||||
// STEP 0
|
||||
endTasks.AddRange(
|
||||
[
|
||||
RolesWebAPIService.GetAllCreatorRoleTypes(successAction: data => _roleTypes = data)
|
||||
RolesClientService.GetAllCreatorRoleTypes(successAction: data => _roleTypes = data)
|
||||
]);
|
||||
|
||||
// END
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Rating;
|
||||
using WatchIt.Website.Services.Utility.Authentication;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.Authentication;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
|
||||
namespace WatchIt.Website.Components.Pages.PersonPage.Panels;
|
||||
|
||||
@@ -10,7 +10,7 @@ public partial class PersonRatingPanel : ComponentBase
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IAuthenticationService AuthenticationService { get; set; } = default!;
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -83,13 +83,13 @@ public partial class PersonRatingPanel : ComponentBase
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task UpdateGlobalRating() => await PersonsWebAPIService.GetPersonGlobalRating(Id, data => Rating = data);
|
||||
protected async Task UpdateGlobalRating() => await PersonsClientService.GetPersonGlobalRating(Id, data => Rating = data);
|
||||
|
||||
protected async Task UpdateUserRating()
|
||||
{
|
||||
if (_user is not null)
|
||||
{
|
||||
await PersonsWebAPIService.GetPersonUserRating(Id, _user.Id, data => _userRating = data);
|
||||
await PersonsClientService.GetPersonUserRating(Id, _user.Id, data => _userRating = data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@using System.Net
|
||||
@using WatchIt.Common.Model.Photos
|
||||
@using WatchIt.Website.Services.WebAPI.Photos
|
||||
@using WatchIt.Website.Services.Client.Photos
|
||||
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ using System.Net;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Accounts;
|
||||
using WatchIt.Common.Model.Photos;
|
||||
using WatchIt.Website.Services.Utility.Authentication;
|
||||
using WatchIt.Website.Services.Utility.Tokens;
|
||||
using WatchIt.Website.Services.WebAPI.Accounts;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Photos;
|
||||
using WatchIt.Website.Services.Authentication;
|
||||
using WatchIt.Website.Services.Tokens;
|
||||
using WatchIt.Website.Services.Client.Accounts;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Photos;
|
||||
|
||||
namespace WatchIt.Website.Layout;
|
||||
|
||||
@@ -18,9 +18,9 @@ public partial class MainLayout : LayoutComponentBase
|
||||
[Inject] public NavigationManager NavigationManager { get; set; } = default!;
|
||||
[Inject] public ITokensService TokensService { get; set; } = default!;
|
||||
[Inject] public IAuthenticationService AuthenticationService { get; set; } = default!;
|
||||
[Inject] public IAccountsWebAPIService AccountsWebAPIService { get; set; } = default!;
|
||||
[Inject] public IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] public IPhotosWebAPIService PhotosWebAPIService { get; set; } = default!;
|
||||
[Inject] public IAccountsClientService AccountsClientService { get; set; } = default!;
|
||||
[Inject] public IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] public IPhotosClientService PhotosClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -76,7 +76,7 @@ public partial class MainLayout : LayoutComponentBase
|
||||
]);
|
||||
endTasks.AddRange(
|
||||
[
|
||||
PhotosWebAPIService.GetPhotoRandomBackground(data => _defaultBackgroundPhoto = data)
|
||||
PhotosClientService.GetPhotoRandomBackground(data => _defaultBackgroundPhoto = data)
|
||||
]);
|
||||
|
||||
// STEP 1
|
||||
@@ -85,7 +85,7 @@ public partial class MainLayout : LayoutComponentBase
|
||||
{
|
||||
endTasks.AddRange(
|
||||
[
|
||||
AccountsWebAPIService.GetAccountProfilePicture(_user.Id, data => _userProfilePicture = data)
|
||||
AccountsClientService.GetAccountProfilePicture(_user.Id, data => _userProfilePicture = data)
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Website.Layout;
|
||||
using WatchIt.Website.Services.Utility.Authentication;
|
||||
using WatchIt.Website.Services.Authentication;
|
||||
|
||||
namespace WatchIt.Website.Pages;
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -3,11 +3,11 @@ using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Accounts;
|
||||
using WatchIt.Common.Model.Media;
|
||||
using WatchIt.Common.Model.Photos;
|
||||
using WatchIt.Website.Services.Utility.Authentication;
|
||||
using WatchIt.Website.Services.Utility.Tokens;
|
||||
using WatchIt.Website.Services.WebAPI.Accounts;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Photos;
|
||||
using WatchIt.Website.Services.Authentication;
|
||||
using WatchIt.Website.Services.Tokens;
|
||||
using WatchIt.Website.Services.Client.Accounts;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Photos;
|
||||
|
||||
namespace WatchIt.Website.Pages;
|
||||
|
||||
@@ -18,9 +18,9 @@ public partial class AuthPage
|
||||
[Inject] public ILogger<AuthPage> Logger { get; set; } = default!;
|
||||
[Inject] public IAuthenticationService AuthenticationService { get; set; } = default!;
|
||||
[Inject] public ITokensService TokensService { get; set; } = default!;
|
||||
[Inject] public IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] public IAccountsWebAPIService AccountsWebAPIService { get; set; } = default!;
|
||||
[Inject] public IPhotosWebAPIService PhotosWebAPIService { get; set; } = default!;
|
||||
[Inject] public IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] public IAccountsClientService AccountsClientService { get; set; } = default!;
|
||||
[Inject] public IPhotosClientService PhotosClientService { get; set; } = default!;
|
||||
[Inject] public NavigationManager NavigationManager { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
@@ -80,7 +80,7 @@ public partial class AuthPage
|
||||
// STEP 0
|
||||
endTasks.AddRange(
|
||||
[
|
||||
PhotosWebAPIService.GetPhotoRandomBackground(data => _background = data)
|
||||
PhotosClientService.GetPhotoRandomBackground(data => _background = data)
|
||||
]);
|
||||
|
||||
// END
|
||||
@@ -112,7 +112,7 @@ public partial class AuthPage
|
||||
}
|
||||
|
||||
|
||||
await AccountsWebAPIService.Authenticate(_loginModel, async (data) => await LoginSuccess(data), LoginBadRequest, LoginUnauthorized);
|
||||
await AccountsClientService.Authenticate(_loginModel, async (data) => await LoginSuccess(data), LoginBadRequest, LoginUnauthorized);
|
||||
}
|
||||
|
||||
private async Task Register()
|
||||
@@ -137,7 +137,7 @@ public partial class AuthPage
|
||||
_formMessage = "Password fields don't match";
|
||||
return;
|
||||
}
|
||||
await AccountsWebAPIService.Register(_registerModel, RegisterSuccess, RegisterBadRequest);
|
||||
await AccountsClientService.Register(_registerModel, RegisterSuccess, RegisterBadRequest);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
AdditionalNameInfoSource="@(item => item.ReleaseDate.HasValue ? $" ({item.ReleaseDate.Value.Year})" : null)"
|
||||
RatingSource="@(item => item.Rating)"
|
||||
UrlIdTemplate="/media/{0}"
|
||||
PictureDownloadingTask="@((id, action) => MediaWebAPIService.GetMediaPoster(id, action))"
|
||||
ItemDownloadingTask="@(MoviesWebAPIService.GetAllMovies)"
|
||||
PictureDownloadingTask="@((id, action) => MediaClientService.GetMediaPoster(id, action))"
|
||||
ItemDownloadingTask="@(MoviesClientService.GetAllMovies)"
|
||||
SortingOptions="@(new Dictionary<string, string>
|
||||
{
|
||||
{ "rating.count", "Number of ratings" },
|
||||
@@ -48,10 +48,10 @@
|
||||
{ "release_date", "Release date" },
|
||||
})"
|
||||
PosterPlaceholder="/assets/media_poster.png"
|
||||
GetGlobalRatingMethod="@((id, action) => MediaWebAPIService.GetMediaRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, successAction, notfoundAction) => MediaWebAPIService.GetMediaRatingByUser(id, userId, successAction, notfoundAction))"
|
||||
PutRatingMethod="@((id, request) => MediaWebAPIService.PutMediaRating(id, request))"
|
||||
DeleteRatingMethod="@(id => MediaWebAPIService.DeleteMediaRating(id))">
|
||||
GetGlobalRatingMethod="@((id, action) => MediaClientService.GetMediaRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, successAction, notfoundAction) => MediaClientService.GetMediaRatingByUser(id, userId, successAction, notfoundAction))"
|
||||
PutRatingMethod="@((id, request) => MediaClientService.PutMediaRating(id, request))"
|
||||
DeleteRatingMethod="@(id => MediaClientService.DeleteMediaRating(id))">
|
||||
<MoviesFilterFormComponent/>
|
||||
</DatabasePageComponent>
|
||||
break;
|
||||
@@ -64,8 +64,8 @@
|
||||
AdditionalNameInfoSource="@(item => item.ReleaseDate.HasValue ? $" ({item.ReleaseDate.Value.Year})" : null)"
|
||||
RatingSource="@(item => item.Rating)"
|
||||
UrlIdTemplate="/media/{0}"
|
||||
PictureDownloadingTask="@((id, action) => MediaWebAPIService.GetMediaPoster(id, action))"
|
||||
ItemDownloadingTask="@(SeriesWebAPIService.GetAllSeries)"
|
||||
PictureDownloadingTask="@((id, action) => MediaClientService.GetMediaPoster(id, action))"
|
||||
ItemDownloadingTask="@(SeriesClientService.GetAllSeries)"
|
||||
SortingOptions="@(new Dictionary<string, string>
|
||||
{
|
||||
{ "rating.count", "Number of ratings" },
|
||||
@@ -74,10 +74,10 @@
|
||||
{ "release_date", "Release date" },
|
||||
})"
|
||||
PosterPlaceholder="/assets/media_poster.png"
|
||||
GetGlobalRatingMethod="@((id, action) => MediaWebAPIService.GetMediaRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, successAction, notfoundAction) => MediaWebAPIService.GetMediaRatingByUser(id, userId, successAction, notfoundAction))"
|
||||
PutRatingMethod="@((id, request) => MediaWebAPIService.PutMediaRating(id, request))"
|
||||
DeleteRatingMethod="@(id => MediaWebAPIService.DeleteMediaRating(id))">
|
||||
GetGlobalRatingMethod="@((id, action) => MediaClientService.GetMediaRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, successAction, notfoundAction) => MediaClientService.GetMediaRatingByUser(id, userId, successAction, notfoundAction))"
|
||||
PutRatingMethod="@((id, request) => MediaClientService.PutMediaRating(id, request))"
|
||||
DeleteRatingMethod="@(id => MediaClientService.DeleteMediaRating(id))">
|
||||
<SeriesFilterFormComponent/>
|
||||
</DatabasePageComponent>
|
||||
break;
|
||||
@@ -89,8 +89,8 @@
|
||||
NameSource="@(item => item.Name)"
|
||||
RatingSource="@(item => item.Rating)"
|
||||
UrlIdTemplate="/person/{0}"
|
||||
PictureDownloadingTask="@((id, action) => PersonsWebAPIService.GetPersonPhoto(id, action))"
|
||||
ItemDownloadingTask="@(PersonsWebAPIService.GetAllPersons)"
|
||||
PictureDownloadingTask="@((id, action) => PersonsClientService.GetPersonPhoto(id, action))"
|
||||
ItemDownloadingTask="@(PersonsClientService.GetAllPersons)"
|
||||
SortingOptions="@(new Dictionary<string, string>
|
||||
{
|
||||
{ "rating.count", "Number of ratings" },
|
||||
@@ -100,7 +100,7 @@
|
||||
{ "death_date", "Death date" },
|
||||
})"
|
||||
PosterPlaceholder="/assets/person_poster.png"
|
||||
GetGlobalRatingMethod="@((id, action) => PersonsWebAPIService.GetPersonGlobalRating(id, action))">
|
||||
GetGlobalRatingMethod="@((id, action) => PersonsClientService.GetPersonGlobalRating(id, action))">
|
||||
<PersonsFilterFormComponent/>
|
||||
</DatabasePageComponent>
|
||||
break;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Website.Layout;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Movies;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Series;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Movies;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Series;
|
||||
|
||||
namespace WatchIt.Website.Pages;
|
||||
|
||||
@@ -12,10 +12,10 @@ public partial class DatabasePage : ComponentBase
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMoviesWebAPIService MoviesWebAPIService { get; set; } = default!;
|
||||
[Inject] private ISeriesWebAPIService SeriesWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] private IMoviesClientService MoviesClientService { get; set; } = default!;
|
||||
[Inject] private ISeriesClientService SeriesClientService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -12,26 +12,26 @@
|
||||
<div class="vstack gap-default">
|
||||
<ViewRankPanelComponent TItem="MovieResponse"
|
||||
Name="movies"
|
||||
GetViewRankAction="@((count, action) => MoviesWebAPIService.GetMoviesViewRank(count, successAction: action))"
|
||||
GetViewRankAction="@((count, action) => MoviesClientService.GetMoviesViewRank(count, successAction: action))"
|
||||
ItemUrlFormatString="/media/{0}"
|
||||
IdSource="@(item => item.Id)"
|
||||
NameSource="@(item => item.ReleaseDate.HasValue ? $"{item.Title} ({item.ReleaseDate.Value.Year})" : item.Title)"
|
||||
PosterPlaceholder="/assets/media_poster.png"
|
||||
GetPictureAction="@((id, action) => MediaWebAPIService.GetMediaPoster(id, action))"/>
|
||||
GetPictureAction="@((id, action) => MediaClientService.GetMediaPoster(id, action))"/>
|
||||
<ViewRankPanelComponent TItem="SeriesResponse"
|
||||
Name="TV series"
|
||||
GetViewRankAction="@((count, action) => SeriesWebAPIService.GetSeriesViewRank(count, successAction: action))"
|
||||
GetViewRankAction="@((count, action) => SeriesClientService.GetSeriesViewRank(count, successAction: action))"
|
||||
ItemUrlFormatString="/media/{0}"
|
||||
IdSource="@(item => item.Id)"
|
||||
NameSource="@(item => item.ReleaseDate.HasValue ? $"{item.Title} ({item.ReleaseDate.Value.Year})" : item.Title)"
|
||||
PosterPlaceholder="/assets/media_poster.png"
|
||||
GetPictureAction="@((id, action) => MediaWebAPIService.GetMediaPoster(id, action))"/>
|
||||
GetPictureAction="@((id, action) => MediaClientService.GetMediaPoster(id, action))"/>
|
||||
<ViewRankPanelComponent TItem="PersonResponse"
|
||||
Name="people"
|
||||
GetViewRankAction="@((count, action) => PersonsWebAPIService.GetPersonsViewRank(count, successAction: action))"
|
||||
GetViewRankAction="@((count, action) => PersonsClientService.GetPersonsViewRank(count, successAction: action))"
|
||||
ItemUrlFormatString="/person/{0}"
|
||||
IdSource="@(item => item.Id)"
|
||||
NameSource="@(item => item.Name)"
|
||||
PosterPlaceholder="/assets/person_poster.png"
|
||||
GetPictureAction="@((id, action) => PersonsWebAPIService.GetPersonPhoto(id, action))"/>
|
||||
GetPictureAction="@((id, action) => PersonsClientService.GetPersonPhoto(id, action))"/>
|
||||
</div>
|
||||
@@ -3,10 +3,10 @@ using WatchIt.Common.Model.Media;
|
||||
using WatchIt.Common.Model.Movies;
|
||||
using WatchIt.Common.Model.Series;
|
||||
using WatchIt.Website.Layout;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Movies;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Series;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Movies;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Series;
|
||||
|
||||
namespace WatchIt.Website.Pages;
|
||||
|
||||
@@ -15,10 +15,10 @@ public partial class HomePage
|
||||
#region SERVICES
|
||||
|
||||
[Inject] public NavigationManager NavigationManager { get; set; } = default!;
|
||||
[Inject] public IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] public IMoviesWebAPIService MoviesWebAPIService { get; set; } = default!;
|
||||
[Inject] public ISeriesWebAPIService SeriesWebAPIService { get; set; } = default!;
|
||||
[Inject] public IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] public IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] public IMoviesClientService MoviesClientService { get; set; } = default!;
|
||||
[Inject] public ISeriesClientService SeriesClientService { get; set; } = default!;
|
||||
[Inject] public IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
<div class="row mt-3 gx-3">
|
||||
<div class="col-auto">
|
||||
<PictureEditorPanelComponent Id="@(Id)"
|
||||
PictureGetTask="@(async (id, action) => await MediaWebAPIService.GetMediaPoster(id, action))"
|
||||
PicturePutTask="@(async (id, data, action) => await MediaWebAPIService.PutMediaPoster(id, new MediaPosterRequest(data), action))"
|
||||
PictureDeleteTask="@(async (id, action) => await MediaWebAPIService.DeleteMediaPoster(id, action))"
|
||||
PictureGetTask="@(async (id, action) => await MediaClientService.GetMediaPoster(id, action))"
|
||||
PicturePutTask="@(async (id, data, action) => await MediaClientService.PutMediaPoster(id, new MediaPosterRequest(data), action))"
|
||||
PictureDeleteTask="@(async (id, action) => await MediaClientService.DeleteMediaPoster(id, action))"
|
||||
PicturePlaceholder="/assets/media_poster.png"
|
||||
Class="h-100"/>
|
||||
</div>
|
||||
|
||||
@@ -7,12 +7,12 @@ using WatchIt.Common.Model.Persons;
|
||||
using WatchIt.Common.Model.Photos;
|
||||
using WatchIt.Common.Model.Series;
|
||||
using WatchIt.Website.Layout;
|
||||
using WatchIt.Website.Services.Utility.Authentication;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Movies;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Photos;
|
||||
using WatchIt.Website.Services.WebAPI.Series;
|
||||
using WatchIt.Website.Services.Authentication;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Movies;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Photos;
|
||||
using WatchIt.Website.Services.Client.Series;
|
||||
|
||||
namespace WatchIt.Website.Pages;
|
||||
|
||||
@@ -22,11 +22,11 @@ public partial class MediaEditPage : ComponentBase
|
||||
|
||||
[Inject] public NavigationManager NavigationManager { get; set; } = default!;
|
||||
[Inject] public IAuthenticationService AuthenticationService { get; set; } = default!;
|
||||
[Inject] public IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] public IMoviesWebAPIService MoviesWebAPIService { get; set; } = default!;
|
||||
[Inject] public ISeriesWebAPIService SeriesWebAPIService { get; set; } = default!;
|
||||
[Inject] public IPhotosWebAPIService PhotosWebAPIService { get; set; } = default!;
|
||||
[Inject] public IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] public IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] public IMoviesClientService MoviesClientService { get; set; } = default!;
|
||||
[Inject] public ISeriesClientService SeriesClientService { get; set; } = default!;
|
||||
[Inject] public IPhotosClientService PhotosClientService { get; set; } = default!;
|
||||
[Inject] public IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -114,7 +114,7 @@ public partial class MediaEditPage : ComponentBase
|
||||
]);
|
||||
endTasks.AddRange(
|
||||
[
|
||||
PersonsWebAPIService.GetAllPersons(successAction: data => _persons = data.ToDictionary(x => x.Id, x => x))
|
||||
PersonsClientService.GetAllPersons(successAction: data => _persons = data.ToDictionary(x => x.Id, x => x))
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -124,13 +124,13 @@ public partial class MediaEditPage : ComponentBase
|
||||
{
|
||||
endTasks.AddRange(
|
||||
[
|
||||
MediaWebAPIService.GetMediaPhotoRandomBackground(Id.Value, data => Layout.BackgroundPhoto = data),
|
||||
MediaWebAPIService.GetMediaPoster(Id.Value, data =>
|
||||
MediaClientService.GetMediaPhotoRandomBackground(Id.Value, data => Layout.BackgroundPhoto = data),
|
||||
MediaClientService.GetMediaPoster(Id.Value, data =>
|
||||
{
|
||||
_mediaPosterSaved = data;
|
||||
_mediaPosterRequest = new MediaPosterRequest(data);
|
||||
}),
|
||||
MediaWebAPIService.GetMediaPhotos(Id.Value, successAction: data => _photos = data)
|
||||
MediaClientService.GetMediaPhotos(Id.Value, successAction: data => _photos = data)
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -145,14 +145,14 @@ public partial class MediaEditPage : ComponentBase
|
||||
{
|
||||
if (Id.HasValue)
|
||||
{
|
||||
await MediaWebAPIService.GetMedia(Id.Value, data => _media = data, () => NavigationManager.NavigateTo("/media/new/movie"));
|
||||
await MediaClientService.GetMedia(Id.Value, data => _media = data, () => NavigationManager.NavigateTo("/media/new/movie"));
|
||||
if (_media.Type == MediaType.Movie)
|
||||
{
|
||||
await MoviesWebAPIService.GetMovie(Id.Value, data => _movieRequest = new MovieRequest(data));
|
||||
await MoviesClientService.GetMovie(Id.Value, data => _movieRequest = new MovieRequest(data));
|
||||
}
|
||||
else
|
||||
{
|
||||
await SeriesWebAPIService.GetSeries(Id.Value, data => _seriesRequest = new SeriesRequest(data));
|
||||
await SeriesClientService.GetSeries(Id.Value, data => _seriesRequest = new SeriesRequest(data));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -210,7 +210,7 @@ public partial class MediaEditPage : ComponentBase
|
||||
}
|
||||
|
||||
_mediaPosterSaving = true;
|
||||
await MediaWebAPIService.PutMediaPoster(Id.Value, _mediaPosterRequest, Success);
|
||||
await MediaClientService.PutMediaPoster(Id.Value, _mediaPosterRequest, Success);
|
||||
}
|
||||
|
||||
private void CancelPoster()
|
||||
@@ -230,7 +230,7 @@ public partial class MediaEditPage : ComponentBase
|
||||
}
|
||||
|
||||
_mediaPosterDeleting = true;
|
||||
await MediaWebAPIService.DeleteMediaPoster(Id.Value, Success);
|
||||
await MediaClientService.DeleteMediaPoster(Id.Value, Success);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -259,22 +259,22 @@ public partial class MediaEditPage : ComponentBase
|
||||
{
|
||||
if (_movieRequest is not null)
|
||||
{
|
||||
await MoviesWebAPIService.PostMovie(_movieRequest, data => SuccessPost(data.Id), BadRequest);
|
||||
await MoviesClientService.PostMovie(_movieRequest, data => SuccessPost(data.Id), BadRequest);
|
||||
}
|
||||
else
|
||||
{
|
||||
await SeriesWebAPIService.PostSeries(_seriesRequest, data => SuccessPost(data.Id), BadRequest);
|
||||
await SeriesClientService.PostSeries(_seriesRequest, data => SuccessPost(data.Id), BadRequest);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_movieRequest is not null)
|
||||
{
|
||||
await MoviesWebAPIService.PutMovie(Id.Value, _movieRequest, () => _basicDataSaving = false, BadRequest);
|
||||
await MoviesClientService.PutMovie(Id.Value, _movieRequest, () => _basicDataSaving = false, BadRequest);
|
||||
}
|
||||
else
|
||||
{
|
||||
await SeriesWebAPIService.PutSeries(Id.Value, _seriesRequest, () => _basicDataSaving = false, BadRequest);
|
||||
await SeriesClientService.PutSeries(Id.Value, _seriesRequest, () => _basicDataSaving = false, BadRequest);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -291,7 +291,7 @@ public partial class MediaEditPage : ComponentBase
|
||||
}
|
||||
|
||||
_photoDeleting.Add(id);
|
||||
await PhotosWebAPIService.DeletePhoto(id, async () => await Success());
|
||||
await PhotosClientService.DeletePhoto(id, async () => await Success());
|
||||
}
|
||||
|
||||
private void InitEditPhoto(Guid? id)
|
||||
@@ -345,17 +345,17 @@ public partial class MediaEditPage : ComponentBase
|
||||
if (_photoEditId is null)
|
||||
{
|
||||
_photoEditRequest.Background = _photoEditIsBackground ? _photoEditBackgroundData : null;
|
||||
await MediaWebAPIService.PostMediaPhoto(Id.Value, _photoEditRequest, Success, BadRequest);
|
||||
await MediaClientService.PostMediaPhoto(Id.Value, _photoEditRequest, Success, BadRequest);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_photoEditIsBackground)
|
||||
{
|
||||
await PhotosWebAPIService.PutPhotoBackgroundData(_photoEditId.Value, _photoEditBackgroundData, Success, BadRequest);
|
||||
await PhotosClientService.PutPhotoBackgroundData(_photoEditId.Value, _photoEditBackgroundData, Success, BadRequest);
|
||||
}
|
||||
else
|
||||
{
|
||||
await PhotosWebAPIService.DeletePhotoBackgroundData(_photoEditId.Value, Success);
|
||||
await PhotosClientService.DeletePhotoBackgroundData(_photoEditId.Value, Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ else
|
||||
Subname="@(_media.OriginalTitle)"
|
||||
Description="@(_media.Description)"
|
||||
PosterPlaceholder="/assets/media_poster.png"
|
||||
GetPosterMethod="@(action => MediaWebAPIService.GetMediaPoster(_media.Id, action))"/>
|
||||
GetPosterMethod="@(action => MediaClientService.GetMediaPoster(_media.Id, action))"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3 gx-3">
|
||||
|
||||
@@ -7,10 +7,10 @@ using WatchIt.Common.Model.Photos;
|
||||
using WatchIt.Common.Model.Rating;
|
||||
using WatchIt.Common.Model.Series;
|
||||
using WatchIt.Website.Layout;
|
||||
using WatchIt.Website.Services.Utility.Authentication;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Movies;
|
||||
using WatchIt.Website.Services.WebAPI.Series;
|
||||
using WatchIt.Website.Services.Authentication;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Movies;
|
||||
using WatchIt.Website.Services.Client.Series;
|
||||
|
||||
namespace WatchIt.Website.Pages;
|
||||
|
||||
@@ -20,9 +20,9 @@ public partial class MediaPage : ComponentBase
|
||||
|
||||
[Inject] public NavigationManager NavigationManager { get; set; } = default!;
|
||||
[Inject] public IAuthenticationService AuthenticationService { get; set; } = default!;
|
||||
[Inject] public IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] public IMoviesWebAPIService MoviesWebAPIService { get; set; } = default!;
|
||||
[Inject] public ISeriesWebAPIService SeriesWebAPIService { get; set; } = default!;
|
||||
[Inject] public IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] public IMoviesClientService MoviesClientService { get; set; } = default!;
|
||||
[Inject] public ISeriesClientService SeriesClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -74,7 +74,7 @@ public partial class MediaPage : ComponentBase
|
||||
// STEP 0
|
||||
step1Tasks.AddRange(
|
||||
[
|
||||
MediaWebAPIService.GetMedia(Id, data => _media = data, () => _error = $"Media with id {Id} was not found")
|
||||
MediaClientService.GetMedia(Id, data => _media = data, () => _error = $"Media with id {Id} was not found")
|
||||
]);
|
||||
|
||||
// STEP 1
|
||||
@@ -88,11 +88,11 @@ public partial class MediaPage : ComponentBase
|
||||
|
||||
endTasks.AddRange(
|
||||
[
|
||||
MediaWebAPIService.PostMediaView(Id),
|
||||
MediaWebAPIService.GetMediaPhotoRandomBackground(Id, data => Layout.BackgroundPhoto = data),
|
||||
MediaWebAPIService.GetMediaGenres(Id, data => _genres = data),
|
||||
MediaWebAPIService.GetMediaRating(Id, data => _globalRating = data),
|
||||
_media.Type == MediaType.Movie ? MoviesWebAPIService.GetMovie(Id, data => _movie = data) : SeriesWebAPIService.GetSeries(Id, data => _series = data),
|
||||
MediaClientService.PostMediaView(Id),
|
||||
MediaClientService.GetMediaPhotoRandomBackground(Id, data => Layout.BackgroundPhoto = data),
|
||||
MediaClientService.GetMediaGenres(Id, data => _genres = data),
|
||||
MediaClientService.GetMediaRating(Id, data => _globalRating = data),
|
||||
_media.Type == MediaType.Movie ? MoviesClientService.GetMovie(Id, data => _movie = data) : SeriesClientService.GetSeries(Id, data => _series = data),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public partial class MediaPage : ComponentBase
|
||||
{
|
||||
endTasks.AddRange(
|
||||
[
|
||||
MediaWebAPIService.GetMediaRatingByUser(Id, _user.Id, data => _userRating = data)
|
||||
MediaClientService.GetMediaRatingByUser(Id, _user.Id, data => _userRating = data)
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -118,15 +118,15 @@ public partial class MediaPage : ComponentBase
|
||||
{
|
||||
if (_userRating == rating)
|
||||
{
|
||||
await MediaWebAPIService.DeleteMediaRating(Id);
|
||||
await MediaClientService.DeleteMediaRating(Id);
|
||||
_userRating = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
await MediaWebAPIService.PutMediaRating(Id, new RatingRequest(rating));
|
||||
await MediaClientService.PutMediaRating(Id, new RatingRequest(rating));
|
||||
_userRating = rating;
|
||||
}
|
||||
await MediaWebAPIService.GetMediaRating(Id, data => _globalRating = data);
|
||||
await MediaClientService.GetMediaRating(Id, data => _globalRating = data);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
<div class="row mt-3 gx-3">
|
||||
<div class="col-auto">
|
||||
<PictureEditorPanelComponent Id="@(Id)"
|
||||
PictureGetTask="@(async (id, action) => await PersonsWebAPIService.GetPersonPhoto(id, action))"
|
||||
PicturePutTask="@(async (id, data, action) => await PersonsWebAPIService.PutPersonPhoto(id, new PersonPhotoRequest(data), action))"
|
||||
PictureDeleteTask="@(async (id, action) => await PersonsWebAPIService.DeletePersonPhoto(id, action))"
|
||||
PictureGetTask="@(async (id, action) => await PersonsClientService.GetPersonPhoto(id, action))"
|
||||
PicturePutTask="@(async (id, data, action) => await PersonsClientService.PutPersonPhoto(id, new PersonPhotoRequest(data), action))"
|
||||
PictureDeleteTask="@(async (id, action) => await PersonsClientService.DeletePersonPhoto(id, action))"
|
||||
PicturePlaceholder="/assets/person_poster.png"
|
||||
Class="h-100"/>
|
||||
</div>
|
||||
|
||||
@@ -2,9 +2,9 @@ using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Media;
|
||||
using WatchIt.Common.Model.Persons;
|
||||
using WatchIt.Website.Layout;
|
||||
using WatchIt.Website.Services.Utility.Authentication;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.Authentication;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
|
||||
namespace WatchIt.Website.Pages;
|
||||
|
||||
@@ -14,8 +14,8 @@ public partial class PersonEditPage : ComponentBase
|
||||
|
||||
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
|
||||
[Inject] private IAuthenticationService AuthenticationService { get; set; } = default!;
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -66,8 +66,8 @@ public partial class PersonEditPage : ComponentBase
|
||||
{
|
||||
endTasks.AddRange(
|
||||
[
|
||||
PersonsWebAPIService.GetPerson(Id.Value, data => _person = data, () => NavigationManager.NavigateTo("/person/new", true)),
|
||||
MediaWebAPIService.GetAllMedia(successAction: data => _media = data.ToDictionary(x => x.Id, x => x)),
|
||||
PersonsClientService.GetPerson(Id.Value, data => _person = data, () => NavigationManager.NavigateTo("/person/new", true)),
|
||||
MediaClientService.GetAllMedia(successAction: data => _media = data.ToDictionary(x => x.Id, x => x)),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
Subname="@(_person.FullName)"
|
||||
Description="@(_person.Description)"
|
||||
PosterPlaceholder="/assets/person_poster.png"
|
||||
GetPosterMethod="@(action => PersonsWebAPIService.GetPersonPhoto(_person.Id, action))"/>
|
||||
GetPosterMethod="@(action => PersonsClientService.GetPersonPhoto(_person.Id, action))"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-default gx-default">
|
||||
|
||||
@@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Common.Model.Persons;
|
||||
using WatchIt.Website.Components.Pages.PersonPage.Panels;
|
||||
using WatchIt.Website.Layout;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
|
||||
namespace WatchIt.Website.Pages;
|
||||
|
||||
@@ -10,7 +10,7 @@ public partial class PersonPage : ComponentBase
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -53,7 +53,7 @@ public partial class PersonPage : ComponentBase
|
||||
// STEP 0
|
||||
step1Tasks.AddRange(
|
||||
[
|
||||
PersonsWebAPIService.GetPerson(Id, data => _person = data)
|
||||
PersonsClientService.GetPerson(Id, data => _person = data)
|
||||
]);
|
||||
|
||||
// STEP 1
|
||||
@@ -62,7 +62,7 @@ public partial class PersonPage : ComponentBase
|
||||
{
|
||||
endTasks.AddRange(
|
||||
[
|
||||
PersonsWebAPIService.PostPersonView(Id),
|
||||
PersonsClientService.PostPersonView(Id),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
AdditionalNameInfoSource="@(item => item.ReleaseDate.HasValue ? $" ({item.ReleaseDate.Value.Year})" : null)"
|
||||
RatingSource="@(item => item.Rating)"
|
||||
Query="@(new MovieQueryParameters { Title = DecodedQuery, OrderBy = "rating.count" })"
|
||||
ItemDownloadingTask="@(MoviesWebAPIService.GetAllMovies)"
|
||||
PictureDownloadingTask="@((id, action) => MediaWebAPIService.GetMediaPoster(id, action))"
|
||||
ItemDownloadingTask="@(MoviesClientService.GetAllMovies)"
|
||||
PictureDownloadingTask="@((id, action) => MediaClientService.GetMediaPoster(id, action))"
|
||||
PosterPlaceholder="/assets/media_poster.png"
|
||||
GetGlobalRatingMethod="@((id, action) => MediaWebAPIService.GetMediaRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, successAction, notfoundAction) => MediaWebAPIService.GetMediaRatingByUser(id, userId, successAction, notfoundAction))"
|
||||
PutRatingMethod="@((id, request) => MediaWebAPIService.PutMediaRating(id, request))"
|
||||
DeleteRatingMethod="@(id => MediaWebAPIService.DeleteMediaRating(id))"/>
|
||||
GetGlobalRatingMethod="@((id, action) => MediaClientService.GetMediaRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, successAction, notfoundAction) => MediaClientService.GetMediaRatingByUser(id, userId, successAction, notfoundAction))"
|
||||
PutRatingMethod="@((id, request) => MediaClientService.PutMediaRating(id, request))"
|
||||
DeleteRatingMethod="@(id => MediaClientService.DeleteMediaRating(id))"/>
|
||||
<SearchResultPanelComponent TItem="SeriesResponse"
|
||||
TQuery="SeriesQueryParameters"
|
||||
Title="TV series"
|
||||
@@ -44,13 +44,13 @@
|
||||
AdditionalNameInfoSource="@(item => item.ReleaseDate.HasValue ? $" ({item.ReleaseDate.Value.Year})" : null)"
|
||||
RatingSource="@(item => item.Rating)"
|
||||
Query="@(new SeriesQueryParameters { Title = DecodedQuery, OrderBy = "rating.count" })"
|
||||
ItemDownloadingTask="@(SeriesWebAPIService.GetAllSeries)"
|
||||
PictureDownloadingTask="@((id, action) => MediaWebAPIService.GetMediaPoster(id, action))"
|
||||
ItemDownloadingTask="@(SeriesClientService.GetAllSeries)"
|
||||
PictureDownloadingTask="@((id, action) => MediaClientService.GetMediaPoster(id, action))"
|
||||
PosterPlaceholder="/assets/media_poster.png"
|
||||
GetGlobalRatingMethod="@((id, action) => MediaWebAPIService.GetMediaRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, successAction, notfoundAction) => MediaWebAPIService.GetMediaRatingByUser(id, userId, successAction, notfoundAction))"
|
||||
PutRatingMethod="@((id, request) => MediaWebAPIService.PutMediaRating(id, request))"
|
||||
DeleteRatingMethod="@(id => MediaWebAPIService.DeleteMediaRating(id))"/>
|
||||
GetGlobalRatingMethod="@((id, action) => MediaClientService.GetMediaRating(id, action))"
|
||||
GetUserRatingMethod="@((id, userId, successAction, notfoundAction) => MediaClientService.GetMediaRatingByUser(id, userId, successAction, notfoundAction))"
|
||||
PutRatingMethod="@((id, request) => MediaClientService.PutMediaRating(id, request))"
|
||||
DeleteRatingMethod="@(id => MediaClientService.DeleteMediaRating(id))"/>
|
||||
<SearchResultPanelComponent TItem="PersonResponse"
|
||||
TQuery="PersonQueryParameters"
|
||||
Title="People"
|
||||
@@ -59,8 +59,8 @@
|
||||
NameSource="@(item => item.Name)"
|
||||
RatingSource="@(item => item.Rating)"
|
||||
Query="@(new PersonQueryParameters { Name = DecodedQuery, OrderBy = "rating.count" })"
|
||||
ItemDownloadingTask="@(PersonsWebAPIService.GetAllPersons)"
|
||||
PictureDownloadingTask="@((id, action) => PersonsWebAPIService.GetPersonPhoto(id, action))"
|
||||
ItemDownloadingTask="@(PersonsClientService.GetAllPersons)"
|
||||
PictureDownloadingTask="@((id, action) => PersonsClientService.GetPersonPhoto(id, action))"
|
||||
PosterPlaceholder="/assets/person_poster.png"
|
||||
GetGlobalRatingMethod="@((id, action) => PersonsWebAPIService.GetPersonGlobalRating(id, action))"/>
|
||||
GetGlobalRatingMethod="@((id, action) => PersonsClientService.GetPersonGlobalRating(id, action))"/>
|
||||
</div>
|
||||
@@ -1,10 +1,10 @@
|
||||
using System.Net;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WatchIt.Website.Layout;
|
||||
using WatchIt.Website.Services.WebAPI.Media;
|
||||
using WatchIt.Website.Services.WebAPI.Movies;
|
||||
using WatchIt.Website.Services.WebAPI.Persons;
|
||||
using WatchIt.Website.Services.WebAPI.Series;
|
||||
using WatchIt.Website.Services.Client.Media;
|
||||
using WatchIt.Website.Services.Client.Movies;
|
||||
using WatchIt.Website.Services.Client.Persons;
|
||||
using WatchIt.Website.Services.Client.Series;
|
||||
|
||||
namespace WatchIt.Website.Pages;
|
||||
|
||||
@@ -12,10 +12,10 @@ public partial class SearchPage : ComponentBase
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
[Inject] private IMoviesWebAPIService MoviesWebAPIService { get; set; } = default!;
|
||||
[Inject] private ISeriesWebAPIService SeriesWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMediaWebAPIService MediaWebAPIService { get; set; } = default!;
|
||||
[Inject] private IPersonsWebAPIService PersonsWebAPIService { get; set; } = default!;
|
||||
[Inject] private IMoviesClientService MoviesClientService { get; set; } = default!;
|
||||
[Inject] private ISeriesClientService SeriesClientService { get; set; } = default!;
|
||||
[Inject] private IMediaClientService MediaClientService { get; set; } = default!;
|
||||
[Inject] private IPersonsClientService PersonsClientService { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
1
WatchIt.Website/WatchIt.Website/Pages/UserEditPage.razor
Normal file
1
WatchIt.Website/WatchIt.Website/Pages/UserEditPage.razor
Normal file
@@ -0,0 +1 @@
|
||||
@page "/user/edit"
|
||||
@@ -0,0 +1,7 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace WatchIt.Website.Pages;
|
||||
|
||||
public partial class UserEditPage : ComponentBase
|
||||
{
|
||||
}
|
||||
1
WatchIt.Website/WatchIt.Website/Pages/UserPage.razor
Normal file
1
WatchIt.Website/WatchIt.Website/Pages/UserPage.razor
Normal file
@@ -0,0 +1 @@
|
||||
@page "/user/{id:long}"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user