diff --git a/src/rest/custom/download.js b/src/rest/custom/download.js index 2802bc3..da94e44 100644 --- a/src/rest/custom/download.js +++ b/src/rest/custom/download.js @@ -8,7 +8,7 @@ module.exports = { let id = request.query?.id dbUtils.detail({table: 'node_custom_config', id}).then(info => { if (info?.id) { - let path = `${info.dist || `../zips/${id}`}`, zipPath = `../zips/${info.id}.zip` + let path = `${info.dist || `../zips/${info.name}v${info.version}`}`, zipPath = `../zips/${info.id}.zip` fse.removeSync(zipPath) fse.pathExists(path, (err, exists) => { console.log(`${path}=========>${exists}`) diff --git a/src/rest/custom/getZip.js b/src/rest/custom/getZip.js index 073f308..0211dcb 100644 --- a/src/rest/custom/getZip.js +++ b/src/rest/custom/getZip.js @@ -17,7 +17,7 @@ module.exports = { mp: 'dvcp_v2_wxmp' }[info.type] || {} const path = `../${buildPath}`, - {dist = `../zips/${id}`} = info + {dist = `../zips/${info.name}v${info.version}`} = info Promise.all([ execute(`./shell/update.sh ${info.name} ${path}`), db.query(sql)