Make heatmaps report always available.
This commit is contained in:
1 parent
12c10c48cd
commit
c7f71e5758
5 files changed
+7
-24
No files matched your search
@@ -1,14 +1,10 @@
|
||||
import { parseRequest, setWebsiteDate } from '@/lib/request';
|
||||
import { forbidden, json, unauthorized } from '@/lib/response';
|
||||
import { json, unauthorized } from '@/lib/response';
|
||||
import { reportResultSchema } from '@/lib/schema';
|
||||
import { canViewWebsite } from '@/permissions';
|
||||
import { getHeatmap, type HeatmapParameters } from '@/queries/sql';
|
||||
|
||||
export async function POST(request: Request) {
|
||||
if (!process.env.UMAMI_SELF_RECORD) {
|
||||
return forbidden({ message: 'Heatmap recording is disabled.' });
|
||||
}
|
||||
|
||||
const { auth, body, error } = await parseRequest(request, reportResultSchema);
|
||||
|
||||
if (error) {
|
||||
|
||||
Reference in new issue
Block a user