store pornhub gallery results into redis only if search is not empty

This commit is contained in:
La macchina desiderante 2024-05-27 12:49:01 +02:00
parent 120be7734c
commit 039f70c086
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,9 @@ export const fetchPornHubGalleryData = async (params?: FetchParams): Promise<Gal
})
})
if (data.length > 0) {
await storeDataIntoRedis(queryUrl, data, DEFAULT_PORNHUB_GALLERY_EXPIRY);
}
}).catch((error: AxiosError) => {
// handle errors