mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
fix redis set for resetWebsite cloudMode
This commit is contained in:
parent
aa376d25df
commit
e64a01d8f1
2 changed files with 6 additions and 3 deletions
|
|
@ -1,12 +1,12 @@
|
||||||
import { z } from 'zod';
|
|
||||||
import { checkAuth } from '@/lib/auth';
|
import { checkAuth } from '@/lib/auth';
|
||||||
import { DEFAULT_PAGE_SIZE, FILTER_COLUMNS } from '@/lib/constants';
|
import { DEFAULT_PAGE_SIZE, FILTER_COLUMNS } from '@/lib/constants';
|
||||||
import { getAllowedUnits, getMinimumUnit, maxDate, parseDateRange } from '@/lib/date';
|
import { getAllowedUnits, getMinimumUnit, maxDate, parseDateRange } from '@/lib/date';
|
||||||
import { fetchWebsite } from '@/lib/load';
|
import { fetchWebsite } from '@/lib/load';
|
||||||
|
import { filtersArrayToObject } from '@/lib/params';
|
||||||
import { badRequest, unauthorized } from '@/lib/response';
|
import { badRequest, unauthorized } from '@/lib/response';
|
||||||
import { QueryFilters } from '@/lib/types';
|
import { QueryFilters } from '@/lib/types';
|
||||||
import { getWebsiteSegment } from '@/queries/prisma';
|
import { getWebsiteSegment } from '@/queries/prisma';
|
||||||
import { filtersArrayToObject } from '@/lib/params';
|
import { z } from 'zod';
|
||||||
|
|
||||||
export async function parseRequest(
|
export async function parseRequest(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,10 @@ export async function resetWebsite(websiteId: string) {
|
||||||
}),
|
}),
|
||||||
]).then(async data => {
|
]).then(async data => {
|
||||||
if (cloudMode) {
|
if (cloudMode) {
|
||||||
await redis.client.set(`website:${websiteId}`, data[3]);
|
await redis.client.set(
|
||||||
|
`website:${websiteId}`,
|
||||||
|
data.find(website => website.id),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue