newest.go 370 B

1234567891011121314151617181920
  1. package routes
  2. import (
  3. "codeberg.org/vnpower/pixivfe/v2/core"
  4. "github.com/gofiber/fiber/v2"
  5. )
  6. func NewestPage(c *fiber.Ctx) error {
  7. worktype := c.Query("type", "illust")
  8. r18 := c.Query("r18", "false")
  9. works, err := core.GetNewestArtworks(c, worktype, r18)
  10. if err != nil {
  11. return err
  12. }
  13. return Render(c, Data_newest{Items: works, Title: "Newest works"})
  14. }