From 5cb5faa386c6f16c90e8be2e9db1f49170cf237b Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 29 Jul 2023 15:02:56 -0700 Subject: [PATCH] refactor: :recycle: use const for non-reassigned vars --- packages/backend/src/db/meilisearch.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/db/meilisearch.ts b/packages/backend/src/db/meilisearch.ts index 8a31566cc0..320f4d5f6e 100644 --- a/packages/backend/src/db/meilisearch.ts +++ b/packages/backend/src/db/meilisearch.ts @@ -211,9 +211,9 @@ export default hasConfig // Determine if we got a webfinger address or a single username if (user.split("@").length > 1) { - let splitUser = user.split("@"); + const splitUser = user.split("@"); - let domain = splitUser.pop(); + const domain = splitUser.pop(); user = splitUser.join("@"); constructedFilters.push( @@ -231,7 +231,7 @@ export default hasConfig } else if (term.startsWith("after:")) { const timestamp = term.slice(6); - let unix = timestampToUnix(timestamp); + const unix = timestampToUnix(timestamp); if (unix !== 0) constructedFilters.push(`createdAt > ${unix}`); @@ -239,7 +239,7 @@ export default hasConfig } else if (term.startsWith("before:")) { const timestamp = term.slice(7); - let unix = timestampToUnix(timestamp); + const unix = timestampToUnix(timestamp); if (unix !== 0) constructedFilters.push(`createdAt < ${unix}`); return null;