mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.20.3",
|
"version": "2.20.4",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ HOME=/w`,
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function getConfig(key: keyof typeof config) {
|
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'))) {
|
if (fs.existsSync(path.resolve(process.cwd(), '.env'))) {
|
||||||
|
|||||||
Reference in new issue
Block a user