コード例 #1
0
        public ActionResult InsertOrUpdateEntry()
        {
            var entry  = _jwtPayload.GetPayload("JWTSignedPayload").ToObject <LadderEntry>();
            var result = _ladderService.Upsert(entry);

            if (result == null)
            {
                _logger.LogInformation("Returning bad request for entry. Maybe malformed request?");
                return(BadRequest());
            }

            _logger.LogInformation("Successfully added or updated entry");
            return(Ok(result));
        }
コード例 #2
0
 public IActionResult DoAuthenticatedEcho()
 {
     return(new JsonResult(_payloadHolder.GetPayload("JWTSignedPayload")));
 }