update files

This commit is contained in:
Astra 2025-07-13 19:24:37 +01:00
parent 218189c35a
commit 1c701e9151
2 changed files with 22 additions and 104 deletions

View file

@ -166,10 +166,8 @@ func (bluesky *Bluesky) DeleteRecord(args []string) *CommitResponse {
return resp
}
func (bluesky *Bluesky) FetchPost(did string, rkey string) Post {
resp := &struct {
Posts []Post `json:"posts"`
}{}
func (bluesky *Bluesky) FetchPost(did string, rkey string) FetchedPost {
resp := FetchedPost{}
params := struct {
URIs string `url:"uris"`
}{
@ -177,5 +175,5 @@ func (bluesky *Bluesky) FetchPost(did string, rkey string) Post {
}
bluesky.sling.New().Base("https://public.api.bsky.app").
Get("/xrpc/app.bsky.feed.getPosts").QueryStruct(&params).Receive(resp, resp)
return resp.Posts[0]
return resp
}