mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-17 05:14:52 +00:00
update blog/posts and go mod
This commit is contained in:
@@ -39,3 +39,17 @@ func (e *Blog) Latest(ctx context.Context, req *proto.LatestRequest, rsp *proto.
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *Blog) Posts(ctx context.Context, req *proto.PostsRequest, rsp *proto.PostsResponse) error {
|
||||
resp, err := e.ps.Query(ctx, &posts.QueryRequest{
|
||||
Limit: req.Limit,
|
||||
Offset: req.Offset,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rsp.Posts = resp.Posts
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user