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..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. @@ -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,18 @@ message QueryListPostResponse { } ``` +Build the blockchain: + +``` +ignite chain build +``` + +Start the blockchain: + +``` +ignite chain serve +``` + **Interacting with the Blog** 1. **Create a Post:**