feat: import of custom platforms & file extensions

This commit is contained in:
DecDuck
2025-09-06 18:29:04 +10:00
parent 7266d0485b
commit fcfc30e5df
36 changed files with 13182 additions and 271 deletions

View File

@ -2,7 +2,6 @@ import { ArkErrors, type } from "arktype";
import type { Prisma } from "~/prisma/client/client";
import aclManager from "~/server/internal/acls";
import prisma from "~/server/internal/db/database";
import { parsePlatform } from "~/server/internal/utils/parseplatform";
const StoreRead = type({
skip: type("string")
@ -45,18 +44,19 @@ export default defineEventHandler(async (h3) => {
}
: undefined;
const platformFilter = options.platform
? {
? ({
versions: {
some: {
platform: {
in: options.platform
.split(",")
.map(parsePlatform)
.filter((e) => e !== undefined),
},
gameVersions: {
some: {
platform: {
id: options.platform
}
}
}
},
},
}
} satisfies Prisma.GameWhereInput)
: undefined;
/**