Update post.js

add update method