public ActionResult <DTOVaultKeep> Delete(int id)
 {
     try
     {
         return(Ok(_vks.Delete(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #2
0
 public ActionResult <bool> Delete(int id)
 {
     try
     {
         return(_vks.Delete(id, HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #3
0
 public ActionResult <string> Delete([FromBody] VaultKeep newVaultKeep)
 {
     try
     {
         return(Ok(_vks.Delete(newVaultKeep)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #4
0
 public ActionResult <string> Delete(int id)
 {
     try
     {
         return(Ok(_vks.Delete(id)));
     }
     catch (System.Exception error)
     {
         return(BadRequest(error.Message));
     }
 }
Example #5
0
 public ActionResult <VaultKeep> Delete(int id)
 {
     try
     {
         var userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_vks.Delete(id, userId)));
     }
     catch (System.Exception error)
     {
         return(BadRequest(error.Message));
     }
 }
Example #6
0
 public ActionResult <String> Delete(int vid, int kid)
 {
     try
     {
         var creatorId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_vks.Delete(vid, kid, creatorId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <String> Delete(int Id)
 {
     try
     {
         string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_vs.Delete(Id, userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #8
0
 public ActionResult <String> Edit(int VaultId, int KeepId)
 {
     try
     {
         var UserId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_vks.Delete(VaultId, KeepId, UserId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <DTOVaultKeep> Delete(int id)
 {
     try
     {
         string userId = findUserInfo();
         return(Ok(_vks.Delete(id, userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #10
0
 public ActionResult <string> Delete(int id)
 {
     try
     {
         _serv.Delete(id);
         return(Ok("success"));
     }
     catch (System.Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #11
0
 public ActionResult<VaultKeep> Delete(int id)
 {
   try
   {
     string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
     return Ok(_vks.Delete(id, userId));
   }
   catch (Exception e)
   {
     return BadRequest(e.Message);
   }
 }
Example #12
0
 public ActionResult <DTOVaultKeep> Delete(int Id)
 {
     try
     {
         string user = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_vks.Delete(user, Id)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
Example #13
0
 public ActionResult <VaultKeeps> Delete([FromBody] VaultKeeps vaultKeep)
 {
     try
     {
         string userId = HttpContext.User.FindFirstValue("id");
         return(Ok(_vks.Delete(vaultKeep, userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #14
0
        public ActionResult <string> Delete(int vaultId, int keepId)
        {
            try
            {
                var userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;

                return(Ok(_vks.Delete(vaultId, keepId, userId)));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            };
        }
Example #15
0
        public async Task <ActionResult <VaultKeep> > Delete(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                return(Ok(_vaultKeepServ.Delete(id, userInfo.Id)));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
Example #16
0
 public ActionResult <String> Delete(int id1, int id2)
 {
     try
     {
         var userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         _vks.Delete(id1, id2, userId);
         return(Ok("VaultKeep"));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <string> Delete([FromRoute] int vaultId, [FromRoute] int keepId)
 {
     try
     {
         string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         _vks.Delete(vaultId, keepId, userId);
         return(Ok("VaultKeep"));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #18
0
        public async Task <ActionResult <bool> > Delete(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                return(Ok(_serve.Delete(id, userInfo.Id)));
            }
            catch (Exception error)
            {
                return(BadRequest(error.Message));
            }
        }
Example #19
0
        public async Task <ActionResult <string> > Delete(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                return(Ok(_vks.Delete(id, userInfo.Id)));
            }
            catch (System.Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
Example #20
0
 public async Task<ActionResult<string>> DeleteAsync(int id)
 {
     try
     {
         Profile userInfo = await HttpContext.GetUserInfoAsync<Profile>();
         _vkserv.Delete(id, userInfo.Id);
         return Ok("deleted");
     }
     catch (System.Exception err)
     {
         return BadRequest(err.Message);
     }
 }
Example #21
0
 public ActionResult <String> Delete([FromBody] VaultKeep vk)
 {
     try
     {
         var userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         vk.UserId = userId;
         return(Ok(_vks.Delete(vk)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #22
0
 public ActionResult <String> Delete([FromBody] int vaultId, int keepId)
 {
     try
     {
         // getting 415 maybe drop tables?
         var userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_vks.Delete(vaultId, keepId, userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
        public async Task <ActionResult <string> > Delete(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                return(Ok(_service.Delete(id, userInfo.Id)));
            }
            catch (System.Exception)
            {
                throw;
            }
        }
        public async Task <ActionResult <Boolean> > Delete(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                Boolean deleted = _vaultKeepsService.Delete(id, userInfo);
                return(Ok(deleted));
            }
            catch (System.Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
 public ActionResult <String> Delete(int vaultId, int keepId)
 {
     try
     {
         var  userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         Keep update = _ks.GetById(keepId);
         _vks.DecrementKeepCount(update);
         return(Ok(_vks.Delete(vaultId, keepId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #26
0
        public async Task <ActionResult <string> > DeleteAsync(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                _service.Delete(id, userInfo.Id);
                return(Ok("Successfully Deleted vaultKeep"));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
Example #27
0
        public async Task <ActionResult <VaultKeep> > Delete(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                _vks.Delete(userInfo.Id, id);
                return(Ok("Successfully Delorted"));
            }
            catch (System.Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
Example #28
0
        public async Task <ActionResult <String> > DeleteVaultKeeps(int id)
        {
            try
            {
                var userInfo = await HttpContext.GetUserInfoAsync <Account>();

                var vk = _vks.Delete(id, userInfo.Id);
                _ks.decrementKeeps(vk.KeepId);
                return(Ok("Delete Successful"));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
 public ActionResult <bool> Delete(int id)
 {
     try
     {
         string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         if (userId == null)
         {
             throw new Exception("no user id provided");
         }
         return(_vks.Delete(id, userId));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #30
0
 public ActionResult <string> Delete(int id)
 {
     try
     {
         Claim user = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier);
         if (user == null)
         {
             throw new Exception("Please Log In.");
         }
         return(Ok(_vks.Delete(user.Value, id)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }