Added feeds for crossposting and a rebuild site button

This commit is contained in:
Leon Mika 2026-03-08 09:37:49 +11:00
parent 76ed54f119
commit fa9be69045
6 changed files with 62 additions and 11 deletions

View file

@ -149,6 +149,18 @@ func (ph PostsHandler) Delete(c fiber.Ctx) error {
return accepts(c, json(func() any {
return fiber.Map{}
}), html(func(c fiber.Ctx) error {
return c.Redirect().To("/sites")
return c.Redirect().To("/")
}))
}
func (ph PostsHandler) Rebuild(c fiber.Ctx) error {
if err := ph.PostService.RebuildSite(c.Context()); err != nil {
return err
}
return accepts(c, json(func() any {
return fiber.Map{}
}), html(func(c fiber.Ctx) error {
return c.Redirect().To("/")
}))
}