public async Task <bool> DeletePostAsync(string key, string postid, string username, string password, bool publish) { await EnsureUser(username, password); try { var result = _repo.DeleteStory(postid); return(await _repo.SaveAllAsync()); } catch (Exception) { return(false); } }
public bool DeletePost(string key, string postid, string username, string password, bool publish) { EnsureUser(username, password).Wait(); try { var result = _repo.DeleteStory(postid); _repo.SaveAll(); return(true); } catch (Exception) { return(false); } }