function updatePost(){
        $.ajax({
            url:'/forum/update/'+$scope.selectedPost.id,
            type:'post',
            data: $scope.selectedPost