Add methods to posts controller