public AccountsController(IMapper mapper,
                           IAccountQueryService accountQueryService, IAccountCommandService accountCommandService)
 {
     _mapper = mapper;
     _accountQueryService   = accountQueryService;
     _accountCommandService = accountCommandService;
 }
 public string Logout([Service] IAccountCommandService service)
 {
     service.Logout();
     return(Ok());
 }
        public async Task <string> Register([Service] IAccountCommandService service, RegisterModel model)
        {
            await service.Register(model);

            return(Ok());
        }
        public async Task <string> RefreshToken([GraphQLSession] ClaimsPrincipal context, [Service] IAccountCommandService service)
        {
            await service.RefreshToken(context);

            return(Ok());
        }
 public async Task <string> Login([Service] IAccountCommandService service, LoginModel model)
 {
     return(Ok(await service.GetToken(model)));
 }