This commit is contained in:
2025-11-03 18:53:32 -08:00
parent eb084e1f07
commit 26ebe77b1d

View File

@@ -1,6 +1,5 @@
import { NextResponse } from "next/server";
import { readdir } from "fs/promises";
import { join } from "path";
import { existsSync } from "fs";
import { SAVE_CONFIG } from "@/lib/saveConfig";
@@ -15,6 +14,10 @@ export async function GET() {
// Read directory and filter for .rhai files
const files = await readdir(saveDir);
console.log(files);
console.log(saveDir);
const scripts = files
.filter((file) => file.endsWith(".rhai"))
.map((file) => file.replace(".rhai", ""))