d234f8df33
* feat: add store nav and fixes * fix: reduce password requirement & new task error ui * fix: client webtoken fix * fix: delta versions and dockerfile * fix: use setup platforms for filter & display * fix: setup not accounted when returning valid options * feat: tighter delta version support * feat: dl/disk size * feat: offload manifest generation to torrential * fix: bump torrential * feat: remove droplet * feat: bump torrential * feat: convert locales
20 lines
711 B
TypeScript
20 lines
711 B
TypeScript
import aclManager from "~/server/internal/acls";
|
|
import prisma from "~/server/internal/db/database";
|
|
import { systemConfig } from "~/server/internal/config/sys-conf";
|
|
import libraryManager from "~/server/internal/library";
|
|
import userStatsManager from "~/server/internal/userstats";
|
|
|
|
export default defineEventHandler(async (h3) => {
|
|
const allowed = await aclManager.allowSystemACL(h3, ["game:read"]);
|
|
if (!allowed) throw createError({ statusCode: 403 });
|
|
|
|
const sources = await libraryManager.fetchLibraries();
|
|
const userStats = await userStatsManager.getUserStats();
|
|
return {
|
|
gameCount: await prisma.game.count(),
|
|
version: systemConfig.getDropVersion(),
|
|
userStats,
|
|
sources,
|
|
};
|
|
});
|