Skip to content

Commit

Permalink
fix: 修复createPost Panic的bug (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lansongxx authored Feb 10, 2024
1 parent 4472a71 commit c4d310c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions biz/application/service/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ var PostSet = wire.NewSet(
)

func (s *PostService) CreatePost(ctx context.Context, req *gencontent.CreatePostReq) (resp *gencontent.CreatePostResp, err error) {
resp = new(gencontent.CreatePostResp)
if resp.PostId, err = s.PostMongoMapper.Insert(ctx, &postmapper.Post{
Title: req.Title,
Text: req.Text,
Expand Down

0 comments on commit c4d310c

Please sign in to comment.