DRY up posts controller