Fixed change password issue. API refactoring. Closes #1592.

This commit is contained in:
Mike Cao 2022-10-25 10:45:56 -07:00
parent 994cf950c8
commit ac070d3ce9
24 changed files with 74 additions and 111 deletions

View file

@ -1,7 +1,16 @@
import prisma from 'lib/prisma';
import redis from 'lib/redis';
export async function getWebsite(where) {
return prisma.client.website.findUnique({
where,
});
return prisma.client.website
.findUnique({
where,
})
.then(async data => {
if (redis.enabled && data) {
await redis.client.set(`website:${data.websiteUuid}`, data.id);
}
return data;
});
}