refactor(env): user 테이블명을 PG_TABLE로 통일(TABLE 레거시 호환 유지)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-26 15:24:42 +09:00
parent 94453ccdae
commit 8140b1f6cd
3 changed files with 18 additions and 3 deletions

View File

@@ -69,7 +69,14 @@ const DB_PORT = Number(pgEnv("PG_DB_PORT", "DB_PORT", "5432")) || 5432;
const DB_NAME = mustPg("PG_DB_NAME", "DB_NAME");
const DB_USER = mustPg("PG_DB_USER", "DB_USER");
const DB_PASSWORD = mustPg("PG_DB_PASSWORD", "DB_PASSWORD");
const TABLE = safeIdent(env("TABLE", "ncue_user") || "ncue_user");
function pgTableName() {
const v = String(env("PG_TABLE", "")).trim();
if (v) return v;
return String(env("TABLE", "ncue_user")).trim() || "ncue_user";
}
const TABLE = safeIdent(pgTableName());
const CONFIG_TABLE = "ncue_app_config";
const CONFIG_TOKEN = env("CONFIG_TOKEN", "").trim();
const ADMIN_EMAILS = new Set(parseEmailCsv(env("ADMIN_EMAILS", "")));