Update publish/unpublish using AJAX