From 095b690f2d27ed77504f0391033367c27879320a Mon Sep 17 00:00:00 2001 From: ptlthg <24925519+ptlthg@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:31:43 -0400 Subject: [PATCH] Formatting --- src/cachetimes.js | 4 ++-- src/credentials.js | 4 ++-- src/lib.js | 8 ++------ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/cachetimes.js b/src/cachetimes.js index 6a28f2f95d..20782c4a7a 100644 --- a/src/cachetimes.js +++ b/src/cachetimes.js @@ -1,4 +1,4 @@ -import credentials from './credentials.js'; +import credentials from "./credentials.js"; /** * Check if a resource is expired based on the cache time @@ -44,4 +44,4 @@ export function isGuildCacheExpired(unixMs) { */ export function isBingoProfileCacheExpired(unixMs) { return isCacheExpired(unixMs, credentials.cache.bingoProfiles); -} \ No newline at end of file +} diff --git a/src/credentials.js b/src/credentials.js index 390de523d9..1d431a30f1 100644 --- a/src/credentials.js +++ b/src/credentials.js @@ -23,8 +23,8 @@ const defaultCredentials = { profiles: 60 * 5, // 5 minutes bingoProfile: 60 * 5, // 5 minutes museum: 60 * 30, // 30 minutes - guild: 60 * 60 * 24 // 24 hours - } + guild: 60 * 60 * 24, // 24 hours + }, }; /** diff --git a/src/lib.js b/src/lib.js index c170fcfcf8..61d0680c8c 100644 --- a/src/lib.js +++ b/src/lib.js @@ -277,9 +277,7 @@ export async function getProfile( const lastCachedSave = profileObject.last_update; - if ( - !options.cacheOnly && (cacheTimes.isProfileCacheExpired(lastCachedSave) || lastCachedSave === 0) - ) { + if (!options.cacheOnly && (cacheTimes.isProfileCacheExpired(lastCachedSave) || lastCachedSave === 0)) { try { profileObject.last_update = Date.now(); response = await retry( @@ -501,9 +499,7 @@ export async function getBingoProfile( }; const lastCachedSave = profileData.last_save ?? 0; - if ( - !options.cacheOnly && (cacheTimes.isBingoProfileCacheExpired(lastCachedSave) || lastCachedSave === 0) - ) { + if (!options.cacheOnly && (cacheTimes.isBingoProfileCacheExpired(lastCachedSave) || lastCachedSave === 0)) { try { const response = await retry( async () => {