Пример #1
0
        public async Task LikePost(int postId, string userName, string password)
        {
            var user = await _userService.GetUserIfValid(new NameAndPassword(userName, password));

            var post = await _postsService.GetPostById(postId);

            _postsService.AddUserToPostLikes(post, user);
            _notificationsService.NotifyPostLiked(post, user);
        }