fix publish api to update template immediately