Remove keycloak and add missing functions
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace Musify.Application.Contracts.Application
|
||||
using X.PagedList;
|
||||
|
||||
namespace Musify.Application.Contracts.Application
|
||||
{
|
||||
public record PaginatedResponse<T>(
|
||||
IReadOnlyCollection<T> Items,
|
||||
@@ -7,5 +9,18 @@
|
||||
int PageCount,
|
||||
int TotalItemCount,
|
||||
bool HasNextPage,
|
||||
bool HasPreviousPage);
|
||||
bool HasPreviousPage)
|
||||
{
|
||||
public static PaginatedResponse<T> FromPagedList(IPagedList<T> pagedList)
|
||||
{
|
||||
return new PaginatedResponse<T>(
|
||||
pagedList.ToArray(),
|
||||
pagedList.PageNumber,
|
||||
pagedList.PageSize,
|
||||
pagedList.PageCount,
|
||||
pagedList.TotalItemCount,
|
||||
pagedList.HasNextPage,
|
||||
pagedList.HasPreviousPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using Musify.Application.Users.Responses;
|
||||
|
||||
namespace Musify.Application.Contracts.Infrastructure
|
||||
{
|
||||
public interface IKeycloakUserService
|
||||
{
|
||||
Task<KeycloakUserResponse> GetUserByIdAsync(string keycloakId, CancellationToken cancellationToken);
|
||||
|
||||
Task<IReadOnlyCollection<KeycloakUserResponse>> GetUsersAsync(
|
||||
CancellationToken cancellationToken,
|
||||
string search = "",
|
||||
int first = 0,
|
||||
int max = 20,
|
||||
string username = "");
|
||||
|
||||
Task<int> GetUsersCountAsync(
|
||||
CancellationToken cancellationToken,
|
||||
string search = "",
|
||||
string username = "");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user