Started working on pages
This commit is contained in:
parent
e2f159e980
commit
ba12398d2f
30 changed files with 1391 additions and 145 deletions
|
|
@ -55,11 +55,11 @@ func (s *Service) DeletePost(ctx context.Context, site models.Site, id int) erro
|
|||
|
||||
func (s *Service) Create(ctx context.Context, site models.Site, req NewPost) (models.Post, error) {
|
||||
post := models.Post{
|
||||
SiteID: site.ID,
|
||||
Title: req.Title,
|
||||
Body: req.Body,
|
||||
State: models.PostStatePublished,
|
||||
PostDate: time.Now(),
|
||||
SiteID: site.ID,
|
||||
Title: req.Title,
|
||||
Body: req.Body,
|
||||
State: models.PostStatePublished,
|
||||
PublishDate: time.Now(),
|
||||
}
|
||||
|
||||
if err := s.Save(ctx, site, &post); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue