Ejemplo n.º 1
0
        public async Task <ActionResult <Group> > GetGroupById([FromBody] UsersGroup ug)
        {
            int id    = ug.GroupId;
            var group = await _groupService.ADGetGroupById(id);

            if (group == null)
            {
                return(NotFound());
            }

            int userId = ug.UserId;

            group.isJoined = await _groupService.IsGroupMemberAD(id, userId);

            return(group);
        }