Beispiel #1
0
 public ActionResult <VaultKeep> DeleteVK(int vaultId, int keepId)
 {
     try
     {
         return(_vks.DeleteVK(vaultId, keepId));
     }
     catch (System.Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <string> DeleteVK(int id)
 {
     try
     {
         Claim user = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier);
         if (user == null)
         {
             return("Not Logged.");
         }
         string userId = user.Value;
         return(Ok(_vks.DeleteVK(userId, id)));
     }
     catch (System.Exception error)
     {
         return(BadRequest(error.Message));
     }
 }