use new PocketBaseClient in microblog package

This commit is contained in:
Travis Shears 2025-09-28 09:21:17 +02:00
parent 2837293474
commit 506a12c06c
3 changed files with 119 additions and 115 deletions

View file

@ -4,15 +4,17 @@ import (
"fmt"
"log"
"gemini_site/internal/microblog"
"gemini_site/internal/pocketbase"
)
func main() {
pbClient := pocketbase.NewPocketBaseClient()
res, err := pbClient.GetList("micro_blog_posts", 1, 10, "-posted")
mb := microblog.NewMicroBlog(pbClient)
res, err := mb.GetRecentPosts(2)
// res, err := pbClient.GetList("micro_blog_posts", 1, 10, "-posted")
fmt.Println("Getting page 1 of microblog posts")
// posts, err := client.GetPosts(1)
if err != nil {
log.Printf("Error getting posts: %v", err)
} else {