mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 22:57:12 +01:00
Updated redis calls.
This commit is contained in:
parent
bb5affe29a
commit
62a8b29453
9 changed files with 41 additions and 27 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Prisma, Website } from '@prisma/client';
|
||||
import redis from '@umami/redis-client';
|
||||
import { getClient } from '@umami/redis-client';
|
||||
import prisma from 'lib/prisma';
|
||||
import { PageResult, PageParams } from 'lib/types';
|
||||
import WebsiteFindManyArgs = Prisma.WebsiteFindManyArgs;
|
||||
|
|
@ -182,7 +182,9 @@ export async function resetWebsite(
|
|||
}),
|
||||
]).then(async data => {
|
||||
if (cloudMode) {
|
||||
await redis.client.set(`website:${websiteId}`, data[3]);
|
||||
const redis = getClient();
|
||||
|
||||
await redis.set(`website:${websiteId}`, data[3]);
|
||||
}
|
||||
|
||||
return data;
|
||||
|
|
@ -225,7 +227,9 @@ export async function deleteWebsite(
|
|||
}),
|
||||
]).then(async data => {
|
||||
if (cloudMode) {
|
||||
await redis.client.del(`website:${websiteId}`);
|
||||
const redis = getClient();
|
||||
|
||||
await redis.del(`website:${websiteId}`);
|
||||
}
|
||||
|
||||
return data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue