add a couple post endpoints + /timelines/home

This commit is contained in:
sam 2023-09-06 16:32:33 +02:00
parent dd72a1f4c1
commit 9f052dc9ef
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
24 changed files with 462 additions and 32 deletions

View file

@ -5,6 +5,7 @@ import (
"emperror.dev/errors"
"git.sleepycat.moe/sam/mercury/config"
"git.sleepycat.moe/sam/mercury/internal/database"
"git.sleepycat.moe/sam/mercury/internal/database/sql"
"git.sleepycat.moe/sam/mercury/web/app"
"github.com/rs/zerolog/log"
@ -52,7 +53,7 @@ func run(c *cli.Context) error {
log.Debug().Msg("Created blog")
log.Debug().Msg("Creating post")
post, err := a.Post().Create(c.Context, blog, "Hello world!")
post, err := a.Post().Create(c.Context, blog, "Hello world!", database.PublicVisibility)
if err != nil {
log.Err(err).Msg("Creating post")
return nil