Browse Source

Pass along edit token on post update

Fixes bug introduced when we moved `Token` into the func's parameters,
out of PostParams.
Matt Baer 1 year ago
parent
commit
cbbd4ec209
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      post.go

+ 3
- 0
post.go View File

@@ -145,8 +145,11 @@ func (c *Client) updatePost(collection, identifier, token string, sp *PostParams
145 145
 	/*
146 146
 		if collection != "" {
147 147
 			endpoint = "/collections/" + collection + endpoint
148
+		} else {
149
+			sp.Token = token
148 150
 		}
149 151
 	*/
152
+	sp.Token = token
150 153
 	env, err := c.put(endpoint, sp, p)
151 154
 	if err != nil {
152 155
 		return nil, err