fix json API posts controller to render correct posts