예제 #1
0
        public IHttpActionResult GetAll()
        {
            var users  = _userService.GetAll();
            var models = CustomMapperPL.FromUserDtoToUserModel(users);

            return(Ok(models));
        }
예제 #2
0
        public IHttpActionResult GetByHeaderId(int id)
        {
            var messages = _messageService.GetByHeaderId(id);
            var model    = CustomMapperPL.FromMessageDtoToMessageModel(messages);

            return(Ok(model));
        }
        public IHttpActionResult GetUsersWhoLike(int id)
        {
            var users = _publicationService.GetUsersWhoLike(id);
            var model = CustomMapperPL.FromUserDtoToUserModel(users);

            return(Ok(model));
        }
        public IHttpActionResult GetMessageHeadersUser()
        {
            var headers = _messageHeaderService.GetMessageHeadersByUserEmail(User.Identity.Name);
            var model   = CustomMapperPL.FromMessageHeaderDtoToMessageHeaderModel(headers);

            return(Ok(model));
        }
예제 #5
0
        public IHttpActionResult GetFilteredUsers()
        {
            var users  = _userService.GetAll();
            var models = CustomMapperPL.FromUserDtoToUserModel(users).Select(user => new UserSearch()
            {
                id = user.Id, name = user.Name
            }).ToList();

            return(Ok(new SearchResult()
            {
                results = models, total = models.Count()
            }));
        }
        public IHttpActionResult GetMessageHeaderType()
        {
            var types = CustomMapperPL.FromMessageHeaderTypeDtoToMessageHeaderTypeModel(_serivce.GetMessageHeaderTypes());

            return(Ok(types));
        }
        public IHttpActionResult GetRelationship()
        {
            var relationships = CustomMapperPL.FromRelationshipDtoToRelationshipModel(_serivce.GetRelationship());

            return(Ok(relationships));
        }
        public IHttpActionResult GetCities()
        {
            var cities = CustomMapperPL.FromCityDtoToCityModel(_serivce.GetCity());

            return(Ok(cities));
        }
        public IHttpActionResult GetCountries()
        {
            var countries = CustomMapperPL.FromCountryDtoToCountryModel(_serivce.GetCountry());

            return(Ok(countries));
        }
        public IHttpActionResult GetPublicationUserMain(string id)
        {
            var publications = CustomMapperPL.FromPublicationDtoToPublicationModel(_publicationService.GetPublicationsByUserIdMain(id));

            return(Ok(publications));
        }
        public IHttpActionResult GetMessageHeader(int id)
        {
            var header = CustomMapperPL.FromMessageHeaderDtoToMessageHeaderModel(_messageHeaderService.GetById(id), false);

            return(Ok(header));
        }
예제 #12
0
        public IHttpActionResult GetCountOfUsersInCity(string city)
        {
            var users = CustomMapperPL.FromUserDtoToUserModel(_userService.GetUsersByCity(city));

            return(Ok(users));
        }
예제 #13
0
        public IHttpActionResult GetUser(string id)
        {
            var user = CustomMapperPL.FromUserDtoToUserModel(_userService.GetUserById(id), false);

            return(Ok(user));
        }
예제 #14
0
        public IHttpActionResult GetCurrentUser()
        {
            var user = CustomMapperPL.FromUserDtoToUserModel(_userService.GetUserByEmail(User.Identity.Name), false);

            return(Ok(user));
        }
예제 #15
0
        public IHttpActionResult GetFollowing(string id)
        {
            var users = CustomMapperPL.FromUserDtoToUserModel(_userService.GetFollowingById(id));

            return(Ok(users));
        }