Esempio n. 1
0
        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)));
        }
Esempio n. 2
0
        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));
            }
        }
Esempio n. 3
0
        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));
            }
        }
Esempio n. 4
0
        public async Task <ActionResult <VaultKeep> > Edit(int id, [FromBody] VaultKeep data)
        {
            Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

            return(Ok(_vaultKeepsService.Edit(id, data, userInfo)));
        }