mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 20:45:39 +01:00
Merge branch 'dev' into feat/um-62-prisma-property-names
This commit is contained in:
commit
3143765954
9 changed files with 30 additions and 29 deletions
|
|
@ -15,7 +15,7 @@ export async function createWebsite(userId, data) {
|
|||
})
|
||||
.then(async res => {
|
||||
if (redis.client && res) {
|
||||
await redis.client.set(`website:${res.websiteUuid}`, res.websiteId);
|
||||
await redis.client.set(`website:${res.websiteUuid}`, res.id);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export async function getWebsiteByUuid(websiteUuid) {
|
|||
})
|
||||
.then(async res => {
|
||||
if (redis.client && res) {
|
||||
await redis.client.set(`website:${res.websiteUuid}`, res.websiteId);
|
||||
await redis.client.set(`website:${res.websiteUuid}`, res.id);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import prisma from 'lib/prisma';
|
||||
|
||||
export async function updateWebsite(websiteId, data) {
|
||||
export async function updateWebsite(data, where) {
|
||||
return prisma.client.website.update({
|
||||
where: {
|
||||
id: websiteId,
|
||||
},
|
||||
where,
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ async function relationalQuery(websiteId, data) {
|
|||
})
|
||||
.then(async res => {
|
||||
if (redis.client && res) {
|
||||
await redis.client.set(`session:${res.sessionUuid}`, res.sessionId);
|
||||
await redis.client.set(`session:${res.sessionUuid}`, res.id);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue