fix(integrations): sort media requests by last modified instead of creation date (#6264)

This commit is contained in:
Thomas authored and GitHub committed 2026-07-10 16:46:33 +02:00
1 parent a2f7b35c5c
commit bcd36b1b27
1 file changed
+7 -4
@@ -132,11 +132,14 @@ export class OverseerrIntegration
}, },
); );
const allRequests = await fetchWithTrustedCertificatesAsync(this.url("/api/v1/request", { take: 20 }), { const allRequests = await fetchWithTrustedCertificatesAsync(
headers: { this.url("/api/v1/request", { take: 20, sort: "modified" }),
"X-Api-Key": this.getSecretValue("apiKey"), {
headers: {
"X-Api-Key": this.getSecretValue("apiKey"),
},
}, },
}); );
const pendingResults = (await getRequestsSchema.parseAsync(await pendingRequests.json())).results; const pendingResults = (await getRequestsSchema.parseAsync(await pendingRequests.json())).results;
const allResults = (await getRequestsSchema.parseAsync(await allRequests.json())).results; const allResults = (await getRequestsSchema.parseAsync(await allRequests.json())).results;