Change createPost into createOrUpdatePost