修复 page 接口返回的 date 字段格式

- 格式化 date 字段,只返回日期部分(YYYY-MM-DD),移除时间信息
This commit is contained in:
ethan.chen
2026-01-08 18:00:19 +08:00
parent d296108f67
commit b33ac37720
2 changed files with 17 additions and 4 deletions

View File

@@ -9,9 +9,10 @@ import { readFileSync } from "fs";
import { join, dirname } from "path";
// 获取当前文件所在目录
const __dirname = typeof import.meta.dir !== 'undefined'
? import.meta.dir
: dirname(new URL(import.meta.url).pathname);
const __dirname =
typeof import.meta.dir !== "undefined"
? import.meta.dir
: dirname(new URL(import.meta.url).pathname);
// 从环境变量获取数据库连接信息
const DATABASE_URL =