newest.go 398 B

1234567891011121314151617181920
  1. package routes
  2. import (
  3. "codeberg.org/vnpower/pixivfe/v2/core"
  4. "net/http"
  5. )
  6. func NewestPage(w http.ResponseWriter, r *http.Request) error {
  7. worktype := GetQueryParam(r, "type", "illust")
  8. r18 := GetQueryParam(r, "r18", "false")
  9. works, err := core.GetNewestArtworks(r, worktype, r18)
  10. if err != nil {
  11. return err
  12. }
  13. return Render(w, r, Data_newest{Items: works, Title: "Newest works"})
  14. }