示例#1
0
        public async Task <IActionResult> CreateAsync([FromBody] GroupRequestModel group)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var admin = await usersManager.FindByNameAsync(User.Identity?.Name);

            var result = await groupsService.CreateAsync(admin, group);

            return(HandlePostResult("groups", result));
        }