mirror of
https://github.com/6dylan6/jdpro.git
synced 2026-04-13 15:50:08 +08:00
Compare commits
4 Commits
d91b4dc822
...
ba4b018953
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba4b018953 | ||
|
|
a069399a69 | ||
|
|
04c4fc06a3 | ||
|
|
b3b1fca083 |
7
jd_anan2_draw.js
Normal file
7
jd_anan2_draw.js
Normal file
File diff suppressed because one or more lines are too long
@@ -25,7 +25,7 @@ else
|
||||
fi
|
||||
grep '6dylan6_20240905' /ql/data/config/task_before.sh >/dev/null 2>&1 || grep '6dylan6_20240905' /ql/config/task_before.sh > /dev/null 2>&1
|
||||
if [[ $? != 0 ]];then
|
||||
cp /ql/repo/${repo}/docker/task_before.sh /ql/config/ >/dev/null 2>&1 || cp /ql/data/repo/${repo}/docker/task_before.sh /ql/data/config/ > /dev/null 2>&1
|
||||
#cp /ql/repo/${repo}/docker/task_before.sh /ql/config/ >/dev/null 2>&1 || cp /ql/data/repo/${repo}/docker/task_before.sh /ql/data/config/ > /dev/null 2>&1
|
||||
fi
|
||||
[[ $QL_DIR == /ql ]] && dir_root=$QL_DIR
|
||||
[[ -d $dir_root/data ]] && dir_data=$dir_root/data
|
||||
|
||||
File diff suppressed because one or more lines are too long
9
jx_ttlhb.js
Normal file
9
jx_ttlhb.js
Normal file
File diff suppressed because one or more lines are too long
@@ -2125,22 +2125,28 @@ function GetnickName2() {
|
||||
}
|
||||
const got = require('got');
|
||||
require('dotenv').config();
|
||||
let exists = fs.existsSync('/ql/data/config/auth.json');
|
||||
let authFile="";
|
||||
if (exists)
|
||||
authFile="/ql/data/config/auth.json"
|
||||
let Fileexists280 = fs.existsSync('/ql/data/db/keyv.sqlite');
|
||||
let Fileexists_ = fs.existsSync('/ql/data/config/auth.json');
|
||||
let authFile = "";
|
||||
if (Fileexists280)
|
||||
authFile = "/ql/data/db/keyv.sqlite"
|
||||
else if (Fileexists_)
|
||||
authFile = "/ql/data/config/auth.json"
|
||||
else
|
||||
authFile="/ql/config/auth.json"
|
||||
authFile = "/ql/config/auth.json"
|
||||
|
||||
|
||||
const api = got.extend({
|
||||
prefixUrl: 'http://127.0.0.1:5600',
|
||||
retry: { limit: 0 },
|
||||
prefixUrl: 'http://127.0.0.1:5600',
|
||||
retry: { limit: 0 },
|
||||
});
|
||||
|
||||
async function getToken() {
|
||||
const authConfig = JSON.parse(fs.readFileSync(authFile));
|
||||
return authConfig.token;
|
||||
const authConfig = await fs.readFileSync(authFile);
|
||||
// console.log(authConfig.toString().match(/"token":"(.*?)",/)[1])
|
||||
return authConfig.toString().match(/"token":"(.*?)",/)[1];
|
||||
}
|
||||
// getToken()
|
||||
|
||||
async function getEnvs(){
|
||||
const token = await getToken();
|
||||
|
||||
Reference in New Issue
Block a user