fixed api end point for create of post, w/ error handling