public ActionResult <VaultKeep> Put([FromBody] VaultKeep editedVaultKeep, int Id) { var userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value; editedVaultKeep.UserId = userId; return(Ok(_vks.Edit(editedVaultKeep))); }
public async Task <ActionResult <VaultKeep> > Edit(int id, [FromBody] VaultKeep editedVaultKeep) { try { Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>(); editedVaultKeep.Id = id; return(Ok(_vaultKeepsService.Edit(editedVaultKeep, userInfo))); } catch (System.Exception error) { return(BadRequest(error.Message)); } }
public async Task <ActionResult <VaultKeep> > Edit(int id, [FromBody] VaultKeep editData) { try { Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>(); editData.Id = id; return(Ok(_ks.Edit(editData, userInfo.Id))); } catch (System.Exception e) { return(BadRequest(e.Message)); } }
public async Task <ActionResult <VaultKeep> > Edit(int id, [FromBody] VaultKeep data) { Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>(); return(Ok(_vaultKeepsService.Edit(id, data, userInfo))); }