mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-07-04 17:30:52 +00:00
15 lines
363 B
TypeScript
15 lines
363 B
TypeScript
// src/app/actions/getProblemLocales.ts
|
|
"use server";
|
|
|
|
import prisma from "@/lib/prisma";
|
|
|
|
export async function getProblemLocales(problemId: string): Promise<string[]> {
|
|
const locales = await prisma.problemLocalization.findMany({
|
|
where: { problemId },
|
|
select: { locale: true },
|
|
distinct: ["locale"],
|
|
});
|
|
|
|
return locales.map((l) => l.locale);
|
|
}
|