乌龟服官服

This commit is contained in:
rucky
2026-05-15 19:17:31 +08:00
parent fa7aedb8e7
commit 557ecebee6
33 changed files with 118 additions and 504 deletions

View File

@@ -11,14 +11,12 @@ export async function GET(
const { id } = await params;
const lang = getApiLang(request);
const wowVersion = getApiWowVersion(request);
const { searchParams } = new URL(request.url);
const wowAll = searchParams.get("wow") === "all";
const software = await prisma.software.findFirst({
where: { OR: [{ id }, { slug: id }] },
include: {
versions: {
...(wowAll ? {} : { where: { wowVersion } }),
where: { wowVersion },
orderBy: { versionCode: "desc" },
},
},
@@ -43,7 +41,7 @@ export async function GET(
changelogEn: v.changelogEn,
})),
lang,
wowVersion: wowAll ? "all" : wowVersion,
wowVersion,
});
}