sending post via AJAX. Posts routes refactoring