mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Fixed change password issue. API refactoring. Closes #1592.
This commit is contained in:
parent
994cf950c8
commit
ac070d3ce9
24 changed files with 74 additions and 111 deletions
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue