seperate regular
This commit is contained in:
@@ -8,7 +8,7 @@ const read = promisify(fs.readFile);
|
||||
|
||||
// 索引与工时
|
||||
const indexToHour: Record<string, number> = JSON.parse(
|
||||
fs.readFileSync("./hours.json", "utf8")
|
||||
fs.readFileSync("./data/hours.json", "utf8")
|
||||
).selections;
|
||||
|
||||
export default async function handler(
|
||||
@@ -18,7 +18,7 @@ export default async function handler(
|
||||
// 读入全部json文件
|
||||
// users: {姓名: {坐标: 权重}}
|
||||
const users: Record<string, Record<string, number>> = {};
|
||||
const files = await g("./json/*.json");
|
||||
const files = await g("./data/json/*.json");
|
||||
for (const file of files) {
|
||||
const jsonStr = await read(file, "utf8");
|
||||
const json: {
|
||||
|
||||
Reference in New Issue
Block a user