fix redis set for resetWebsite cloudMode

This commit is contained in:
Francis Cao 2025-10-05 22:37:06 -07:00
parent aa376d25df
commit e64a01d8f1
2 changed files with 6 additions and 3 deletions

View file

@ -1,12 +1,12 @@
import { z } from 'zod';
import { checkAuth } from '@/lib/auth';
import { DEFAULT_PAGE_SIZE, FILTER_COLUMNS } from '@/lib/constants';
import { getAllowedUnits, getMinimumUnit, maxDate, parseDateRange } from '@/lib/date';
import { fetchWebsite } from '@/lib/load';
import { filtersArrayToObject } from '@/lib/params';
import { badRequest, unauthorized } from '@/lib/response';
import { QueryFilters } from '@/lib/types';
import { getWebsiteSegment } from '@/queries/prisma';
import { filtersArrayToObject } from '@/lib/params';
import { z } from 'zod';
export async function parseRequest(
request: Request,

View file

@ -156,7 +156,10 @@ export async function resetWebsite(websiteId: string) {
}),
]).then(async data => {
if (cloudMode) {
await redis.client.set(`website:${websiteId}`, data[3]);
await redis.client.set(
`website:${websiteId}`,
data.find(website => website.id),
);
}
return data;