Пример #1
0
        public async Task <ActionResult> AddMember(int user, int group)
        {
            try
            {
                var newmember = await _groupMemberData.AddGroupMemberAsync(user, group);

                if (newmember == null || newmember.memberid <= 0)
                {
                    return(BadRequest(new CommonResponse {
                        Status = false
                    }));
                }
                return(Ok(new CommonResponse {
                    Status = true
                }));
            }
            catch (Exception exp)
            {
                _Logger.LogError(exp.Message);
                return(BadRequest(new CommonResponse {
                    Status = false
                }));
            }
        }