mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-15 12:34:44 +00:00
Add Image field to posts.Posts (#26)
This commit is contained in:
@@ -65,6 +65,7 @@ func (p *Posts) Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.Sav
|
||||
Slug: postSlug,
|
||||
Created: time.Now().Unix(),
|
||||
Metadata: req.Metadata,
|
||||
Image: req.Image,
|
||||
}
|
||||
err := p.savePost(ctx, nil, post)
|
||||
if err != nil {
|
||||
@@ -83,6 +84,7 @@ func (p *Posts) Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.Sav
|
||||
Created: oldPost.Created,
|
||||
Updated: time.Now().Unix(),
|
||||
Metadata: req.Metadata,
|
||||
Image: req.Image,
|
||||
}
|
||||
if len(req.Title) > 0 {
|
||||
post.Title = req.Title
|
||||
|
||||
Reference in New Issue
Block a user