Exemplo n.º 1
0
 public ActionResult <VaultKeep> Create([FromBody] VaultKeep newVaultKeep)
 {
     try
     {
         string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         newVaultKeep.UserId = userId;
         return(Ok(_vks.Create(newVaultKeep)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }