public async Task <IEnumerable <StudyRoomDto> > StudyRoomAsync(CancellationToken token)
        {
            var query  = new StudyRoomQuery(User.GetCountryClaim());
            var retVal = await _queryBus.QueryAsync(query, token);

            return(retVal);
        }
Пример #2
0
        public async Task <ActionResult <StudyRoomDto> > GetStudyRoomAsync(Guid id,
                                                                           [FromServices] IUrlBuilder urlBuilder, CancellationToken token)
        {
            var userId = _userManager.GetLongUserId(User);
            var query  = new StudyRoomQuery(id, userId);
            var result = await _queryBus.QueryAsync(query, token);


            //TODO: need to add who is the tutor
            if (result == null)
            {
                return(NotFound());
            }
            result.StudentImage = urlBuilder.BuildUserImageEndpoint(result.StudentId, result.StudentImage);
            result.TutorImage   = urlBuilder.BuildUserImageEndpoint(result.TutorId, result.TutorImage);
            return(result);
        }
Пример #3
0
 public async Task AdminStudyRoomQuery_Ok(string country)
 {
     var query = new StudyRoomQuery(country);
     await _fixture.QueryBus.QueryAsync(query, default);
 }
Пример #4
0
        public async Task StudyRoomQuery_Ok()
        {
            var query = new StudyRoomQuery(Guid.Parse("0F70AF05-BAD4-4299-8341-AA38007858CF"), 159039);

            var _ = await fixture.QueryBus.QueryAsync(query, default);
        }