Refactor redis calls.

This commit is contained in:
Mike Cao 2022-10-25 20:17:13 -07:00
parent 7f3db334f5
commit d05fd2bd3d
7 changed files with 15 additions and 15 deletions

View file

@ -14,8 +14,8 @@ export async function createWebsite(userId, data) {
},
})
.then(async res => {
if (redis.client && res) {
await redis.client.set(`website:${res.websiteUuid}`, res.id);
if (redis.enabled && res) {
await redis.set(`website:${res.websiteUuid}`, res.id);
}
return res;