public ActionResult <Vault> Post(int id, [FromBody] VaultKeep data) { try { data.UserId = HttpContext.User.FindFirstValue("Id"); data.VaultId = id; return(Ok(_Repo.AddToVault(data))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Vault> Post(int id, [FromBody] VaultKeep data) { try { data.UserId = HttpContext.User.FindFirstValue("Id"); data.VaultId = id; return(Ok(_Repo.AddToVault(data))); } catch (Exception e) { return(BadRequest(e.Message)); } }