change deleteRecord to use JSON
This commit is contained in:
parent
3570a53de2
commit
fa0376bf3c
1 changed files with 4 additions and 4 deletions
|
@ -213,15 +213,15 @@ func (bluesky *Bluesky) DeleteRecord(args []string) *CommitResponse {
|
||||||
|
|
||||||
resp := new(CommitResponse)
|
resp := new(CommitResponse)
|
||||||
params := struct {
|
params := struct {
|
||||||
RKey string `url:"rkey"`
|
RKey string `json:"rkey"`
|
||||||
Repo string `url:"repo"`
|
Repo string `json:"repo"`
|
||||||
Collection string `url:"collection"`
|
Collection string `json:"collection"`
|
||||||
}{
|
}{
|
||||||
RKey: args[0],
|
RKey: args[0],
|
||||||
Repo: args[1],
|
Repo: args[1],
|
||||||
Collection: args[2],
|
Collection: args[2],
|
||||||
}
|
}
|
||||||
bluesky.sling.New().Set("Authorization", fmt.Sprintf("Bearer %s", bluesky.Cfg.AccessJWT)).
|
bluesky.sling.New().Set("Authorization", fmt.Sprintf("Bearer %s", bluesky.Cfg.AccessJWT)).
|
||||||
Post("/xrpc/com.atproto.repo.deleteRecord").QueryStruct(params).Receive(resp, resp)
|
Post("/xrpc/com.atproto.repo.deleteRecord").BodyJSON(params).Receive(resp, resp)
|
||||||
return resp
|
return resp
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue