From fa4b92bd462ff09ea53fe37c92beef74256c4643 Mon Sep 17 00:00:00 2001 From: Dustin Brett Date: Sun, 30 Nov 2025 21:45:38 -0800 Subject: [PATCH] Dynamic payload for new seeds --- .../system/Desktop/Wallpapers/handlers.ts | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/components/system/Desktop/Wallpapers/handlers.ts b/components/system/Desktop/Wallpapers/handlers.ts index 2fc0f273..fa7e5d30 100644 --- a/components/system/Desktop/Wallpapers/handlers.ts +++ b/components/system/Desktop/Wallpapers/handlers.ts @@ -58,46 +58,46 @@ export const wallpaperHandler: Record = { }; }, ART_INSTITUTE_OF_CHICAGO: async () => { - const requestPayload = { - boost: false, - fields: ["image_id"], - limit: 1, - query: { - function_score: { - boost_mode: "replace", - query: { - bool: { - filter: [ - { - term: { - is_public_domain: true, - }, - }, - { - terms: { - artwork_type_id: [1], // Painting - }, - }, - { - exists: { - field: "image_id", - }, - }, - ], - }, - }, - random_score: { - field: "id", - seed: Date.now(), - }, - }, - }, - }; + // eslint-disable-next-line unicorn/consistent-function-scoping const fetchArtwork = (): Promise => jsonFetch( API_URL.ART_INSTITUTE_OF_CHICAGO, { - body: JSON.stringify(requestPayload), + body: JSON.stringify({ + boost: false, + fields: ["image_id"], + limit: 1, + query: { + function_score: { + boost_mode: "replace", + query: { + bool: { + filter: [ + { + term: { + is_public_domain: true, + }, + }, + { + terms: { + artwork_type_id: [1], // Painting + }, + }, + { + exists: { + field: "image_id", + }, + }, + ], + }, + }, + random_score: { + field: "id", + seed: Date.now(), + }, + }, + }, + }), headers: { "Content-Type": "application/json", },