예제 #1
0
        public async Task <IActionResult> AssignSurveysToGroup([FromBody] HelperIdModelList surveyIDGroupID)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var result = await surveyService.AssignSurveysToGroup(surveyIDGroupID.UsersId, surveyIDGroupID.GroupsId);

            if (result.StateMessage == CommonResultState.OK)
            {
                return(Ok(result.Message));
            }

            return(BadRequest(result.Message));
        }