mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
judge: use config[key]
This commit is contained in:
1 parent
a6c41ec39d
commit
e3d61924ef
2 files changed
+2
-2
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.20.3",
|
||||
"version": "2.20.4",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -33,7 +33,7 @@ HOME=/w`,
|
||||
};
|
||||
|
||||
export function getConfig(key: keyof typeof config) {
|
||||
return global.Hydro ? global.Hydro.model.system.get(`hydrojudge.${key}`) : config[key];
|
||||
return global.Hydro ? global.Hydro.model.system.get(`hydrojudge.${key}`) ?? config[key] : config[key];
|
||||
}
|
||||
|
||||
if (fs.existsSync(path.resolve(process.cwd(), '.env'))) {
|
||||
|
||||
Reference in new issue
Block a user