Added feeds for crossposting and a rebuild site button
This commit is contained in:
parent
76ed54f119
commit
fa9be69045
6 changed files with 62 additions and 11 deletions
|
|
@ -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("/")
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue