From 96e10a438bbd9e5fc285be75d93346242ab4b959 Mon Sep 17 00:00:00 2001 From: chenqin <490358423@qq.com> Date: Tue, 19 Nov 2024 16:24:58 +0800 Subject: [PATCH 1/3] update tutorial --- docs/versioned_docs/version-v28/02-guide/04-blog.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/versioned_docs/version-v28/02-guide/04-blog.md b/docs/versioned_docs/version-v28/02-guide/04-blog.md index df8b1e6522..37a9a6392b 100644 --- a/docs/versioned_docs/version-v28/02-guide/04-blog.md +++ b/docs/versioned_docs/version-v28/02-guide/04-blog.md @@ -220,7 +220,7 @@ ignite scaffold message delete-post id:uint This command enables the deletion of posts by their ID. 2. **Delete Logic:** - + Implement RemovePost in `x/blog/keeper/post.go` to delete posts from the store. ```go title="x/blog/keeper/post.go" @@ -301,7 +301,7 @@ func (k Keeper) ShowPost(goCtx context.Context, req *types.QueryShowPostRequest) return nil, sdkerrors.ErrKeyNotFound } - return &types.QueryShowPostResponse{Post: post}, nil + return &types.QueryShowPostResponse{Post: &post}, nil } ``` @@ -366,6 +366,12 @@ message QueryListPostResponse { } ``` +Build the blockchain: + +``` +ignite chain build +``` + **Interacting with the Blog** 1. **Create a Post:** From 790159689a9642699af327b0955b25bc7783bb00 Mon Sep 17 00:00:00 2001 From: chenqin <490358423@qq.com> Date: Tue, 19 Nov 2024 16:27:53 +0800 Subject: [PATCH 2/3] update tutorial --- docs/versioned_docs/version-v28/02-guide/04-blog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/versioned_docs/version-v28/02-guide/04-blog.md b/docs/versioned_docs/version-v28/02-guide/04-blog.md index 37a9a6392b..b082438ecb 100644 --- a/docs/versioned_docs/version-v28/02-guide/04-blog.md +++ b/docs/versioned_docs/version-v28/02-guide/04-blog.md @@ -372,6 +372,12 @@ Build the blockchain: ignite chain build ``` +Start the blockchain: + +``` +ignite chain serve +``` + **Interacting with the Blog** 1. **Create a Post:** From 291501700955f7a3eccd88403c20de9f2c67b0b1 Mon Sep 17 00:00:00 2001 From: chenqin <490358423@qq.com> Date: Tue, 19 Nov 2024 17:15:33 +0800 Subject: [PATCH 3/3] fix comment --- docs/versioned_docs/version-v28/02-guide/04-blog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versioned_docs/version-v28/02-guide/04-blog.md b/docs/versioned_docs/version-v28/02-guide/04-blog.md index b082438ecb..2f0cb412d9 100644 --- a/docs/versioned_docs/version-v28/02-guide/04-blog.md +++ b/docs/versioned_docs/version-v28/02-guide/04-blog.md @@ -111,7 +111,7 @@ Add the `PostKey` and `PostCountKey` functions to the `x/blog/types/keys.go` fil ```go title="x/blog/types/keys.go" // PostKey is used to uniquely identify posts within the system. - // It will be used as the beginning of the key for each post, followed bei their unique ID + // It will be used as the beginning of the key for each post, followed by their unique ID PostKey = "Post/value/" // This key will be used to keep track of the ID of the latest post added to the store.