@rmdes/indiekit-endpoint-rss 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/publisher.js +4 -1
- package/package.json +1 -1
package/lib/publisher.js
CHANGED
|
@@ -18,7 +18,10 @@ export function mintToken(me) {
|
|
|
18
18
|
throw new Error("Cannot publish: SECRET is not configured");
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
// Both scopes: an item that already has a post is updated, not created, and
|
|
22
|
+
// checkScope treats them as distinct actions — a create-only token gets a
|
|
23
|
+
// 403 insufficient_scope on every republish.
|
|
24
|
+
return jwt.sign({ me, scope: "create update" }, process.env.SECRET, {
|
|
22
25
|
expiresIn: TOKEN_TTL,
|
|
23
26
|
});
|
|
24
27
|
}
|
package/package.json
CHANGED