Updated setupAjaxPost to use new promise methods