add db call as fallback

This commit is contained in:
Brian Cao committed 2022-08-29 13:04:58 -07:00
1 parent 9ddbd12060
commit b6cd9f305b
10 files changed
+71 -40

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ export async function getWebsiteByUuid(website_uuid) {
},
})
.then(async res => {
if (process.env.REDIS_URL && res) {
if (redis.client && res) {
await redis.client.set(`website:${res.website_uuid}`, 1);
}