Refactored create and add vote method for posts.
Edited post model