Fixed change password issue. API refactoring. Closes #1592.
This commit is contained in:
1 parent
994cf950c8
commit
ac070d3ce9
24 files changed
+74
-111
No files matched your search
@@ -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;
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user