public ActionResult <VaultKeep> GetVaultKeepById(int id) { try { return(Ok(_vks.GetVaultKeepById(id))); } catch (System.Exception err) { return(BadRequest(err.Message)); } }
public ActionResult <VaultKeep> GetVaultKeepById(int id) { try { var userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value; return(Ok(_vks.GetVaultKeepById(id, userId))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public async Task <ActionResult <VaultKeep> > GetVaultKeepById(int id) { try { Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>(); return(Ok(_vks.GetVaultKeepById(id, userInfo))); } catch (System.Exception e) { return(BadRequest(e.Message)); } }