Change post create and destroy to js