add api for thread and post
fix post and thread model