add db call as fallback

This commit is contained in:
Brian Cao 2022-08-29 13:04:58 -07:00
parent 9ddbd12060
commit b6cd9f305b
10 changed files with 71 additions and 40 deletions

View file

@ -14,7 +14,7 @@ export async function createWebsite(user_id, data) {
},
})
.then(async res => {
if (process.env.REDIS_URL && res) {
if (redis.client && res) {
await redis.set(`website:${res.website_uuid}`, Number(res.website_id));
}