Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(blog): fix pointer type and add build steps #4412

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions docs/versioned_docs/version-v28/02-guide/04-blog.md
julienrbrt marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
```

Expand Down Expand Up @@ -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:**
Expand Down
Loading