コード例 #1
0
        public async Task <ActionResult <ManipulationResult <GroupMember> > > PostGroupMemberAsync([FromBody] GroupMember groupMember)
        {
            var userIdClaimed = HttpContext.User.Identity.GetUserIdClaim();

            if (userIdClaimed is null)
            {
                return(BadRequest());
            }

            var postResult = await _groupMemberService.CreateGroupMemberAsync(userIdClaimed.Value, groupMember);

            return(Ok(postResult));
        }