fix: 修復路徑錯誤問題
This commit is contained in:
3
index.ts
3
index.ts
@@ -9,8 +9,7 @@ const path: string = YAML.parse(fs.readFileSync('../config.yml', 'utf-8')).path
|
|||||||
|
|
||||||
fs.watch(path, async function (event, filename) {
|
fs.watch(path, async function (event, filename) {
|
||||||
if (!(filename && event === 'change')) return
|
if (!(filename && event === 'change')) return
|
||||||
|
const jpath: string = `${path}/${filename}`
|
||||||
const jpath: string = `./${filename}`
|
|
||||||
const requestData: IrequestData = JSON.parse(fs.readFileSync(jpath).toString())
|
const requestData: IrequestData = JSON.parse(fs.readFileSync(jpath).toString())
|
||||||
if (requestData.Processed === true) return
|
if (requestData.Processed === true) return
|
||||||
const method: any = requestData.Request.Mode.toUpperCase()
|
const method: any = requestData.Request.Mode.toUpperCase()
|
||||||
|
|||||||
Reference in New Issue
Block a user