Beispiel #1
0
 public void DeleteAll([FromBody] bool confirm)
 {
     if (!confirm)
     {
         NotesProvider.DeleteAll(User.Identity.GetUserId());
     }
 }
Beispiel #2
0
        public async Task <IHttpActionResult> Delete(DeleteAccountModel userPass)
        {
            ApplicationUser user = await UserManager.FindAsync(User.Identity.GetUserName(), userPass.userPass);

            if (user != null)
            {
                await UserManager.DeleteAsync(user);

                NotesProvider.DeleteAll(User.Identity.GetUserId());
                return(Ok());
            }
            return(BadRequest("ERROR"));
        }