Require token for Funkwhale scope=me sync
This commit is contained in:
@@ -10,6 +10,20 @@ const patchSpecs = [
|
|||||||
scope: "all",
|
scope: "all",
|
||||||
});`,
|
});`,
|
||||||
newSnippet: ` return this.fetch("/api/v2/history/listenings", {
|
newSnippet: ` return this.fetch("/api/v2/history/listenings", {
|
||||||
|
page,
|
||||||
|
page_size: pageSize,
|
||||||
|
// prefer user-scoped history to avoid instance-wide sync volume
|
||||||
|
scope: this.username && this.token ? "me" : "all",
|
||||||
|
});`,
|
||||||
|
candidates: [
|
||||||
|
"node_modules/@rmdes/indiekit-endpoint-funkwhale/lib/funkwhale-client.js",
|
||||||
|
"node_modules/@indiekit/indiekit/node_modules/@rmdes/indiekit-endpoint-funkwhale/lib/funkwhale-client.js",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "funkwhale-client-scope-me-token-guard",
|
||||||
|
marker: "require token for user-scoped history",
|
||||||
|
oldSnippet: ` return this.fetch("/api/v2/history/listenings", {
|
||||||
page,
|
page,
|
||||||
page_size: pageSize,
|
page_size: pageSize,
|
||||||
// prefer user-scoped history to avoid instance-wide sync volume
|
// prefer user-scoped history to avoid instance-wide sync volume
|
||||||
@@ -19,6 +33,13 @@ const patchSpecs = [
|
|||||||
"node_modules/@rmdes/indiekit-endpoint-funkwhale/lib/funkwhale-client.js",
|
"node_modules/@rmdes/indiekit-endpoint-funkwhale/lib/funkwhale-client.js",
|
||||||
"node_modules/@indiekit/indiekit/node_modules/@rmdes/indiekit-endpoint-funkwhale/lib/funkwhale-client.js",
|
"node_modules/@indiekit/indiekit/node_modules/@rmdes/indiekit-endpoint-funkwhale/lib/funkwhale-client.js",
|
||||||
],
|
],
|
||||||
|
newSnippet: ` return this.fetch("/api/v2/history/listenings", {
|
||||||
|
page,
|
||||||
|
page_size: pageSize,
|
||||||
|
// prefer user-scoped history to avoid instance-wide sync volume
|
||||||
|
// require token for user-scoped history
|
||||||
|
scope: this.username && this.token ? "me" : "all",
|
||||||
|
});`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastfm-invalid-json-guard",
|
name: "lastfm-invalid-json-guard",
|
||||||
|
|||||||
Reference in New Issue
Block a user