fixes stats page activity limit

This commit is contained in:
Christian Beutel
2025-04-11 14:32:52 +02:00
parent 5790da2317
commit 6bf419b98e
4 changed files with 20 additions and 27 deletions

View File

@@ -1,6 +1,5 @@
import { SummitLogCreateSchema } from '$lib/models/api/summit_log_schema';
import type { SummitLog } from '$lib/models/summit_log';
import { pb } from '$lib/pocketbase';
import { Collection, create, handleError, list } from '$lib/util/api_util';
import { json, type RequestEvent } from '@sveltejs/kit';
@@ -8,15 +7,6 @@ export async function GET(event: RequestEvent) {
try {
const r = await list<SummitLog>(event, Collection.summit_logs);
for (const t of r.items) {
if (!t.author || !pb.authStore.record) {
continue;
}
if (!t.expand) {
t.expand = {} as any
}
t.expand!.author = await pb.collection("users_anonymous").getOne(t.author);
}
return json(r)
} catch (e: any) {
throw handleError(e);