add functions to delete a post on client and server