mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-11-25 07:42:58 +01:00
19 lines
625 B
C#
19 lines
625 B
C#
using System.Collections.Immutable;
|
|
using Phantom.Common.Data.Web.Users;
|
|
using Phantom.Common.Messages.Web.ToController;
|
|
using Phantom.Web.Services.Rpc;
|
|
|
|
namespace Phantom.Web.Services.Users;
|
|
|
|
public sealed class RoleManager {
|
|
private readonly ControllerConnection controllerConnection;
|
|
|
|
public RoleManager(ControllerConnection controllerConnection) {
|
|
this.controllerConnection = controllerConnection;
|
|
}
|
|
|
|
public Task<ImmutableArray<RoleInfo>> GetAll(CancellationToken cancellationToken) {
|
|
return controllerConnection.Send<GetRolesMessage, ImmutableArray<RoleInfo>>(new GetRolesMessage(), cancellationToken);
|
|
}
|
|
}
|