mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-15 09:11:21 +10:00
feat: import of custom platforms & file extensions
This commit is contained in:
@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user