diff --git a/lib.js b/lib.js index 555f7c6..a61bfdc 100644 --- a/lib.js +++ b/lib.js @@ -262,7 +262,18 @@ class Post { data ); - // return await Post.getById(project, postId); + return postId; + } + + /** see {@link create} */ + static async update(project, postId, data) { + await fetch( + "PUT", + `/project/${encodeURIComponent(project.handle)}/posts/${postId}`, + project.user.sessionCookie, + data + ); + return postId; }