public ActionResult <Group> Post([FromBody] Group newGroup) { try { var userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value; newGroup.UserId = userId; return(Ok(_gs.Create(newGroup))); } catch (Exception e) { return(BadRequest(e.Message)); } }