示例#1
0
        public ActionResult PostFullCapabilities(
            [FromQuery] string?id,
            [FromBody, Required] ClientCapabilitiesDto capabilities)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                id = RequestHelpers.GetSession(_sessionManager, _authContext, Request).Id;
            }

            _sessionManager.ReportCapabilities(id, capabilities.ToClientCapabilities());

            return(NoContent());
        }
示例#2
0
        public async Task <ActionResult> PostFullCapabilities(
            [FromQuery] string?id,
            [FromBody, Required] ClientCapabilitiesDto capabilities)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                id = await RequestHelpers.GetSessionId(_sessionManager, _authContext, Request).ConfigureAwait(false);
            }

            _sessionManager.ReportCapabilities(id, capabilities.ToClientCapabilities());

            return(NoContent());
        }