-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Kreedzt - fixed build version set proxy error
- Loading branch information
Showing
3 changed files
with
79 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
const log = require('electron-log'); | ||
const { promisedReadFile, promisedWriteFile } = require('./promisedFs'); | ||
const { getCorrectPath } = require('./env'); | ||
|
||
const logger = log.scope('proxy.js'); | ||
|
||
const proxyFilePath = getCorrectPath('config/proxy'); | ||
|
||
const setProxy = async proxyUrl => promisedWriteFile(proxyFilePath, proxyUrl); | ||
const setProxy = async proxyUrl => { | ||
logger.info('setProxy fn'); | ||
logger.info('proxyFilePath', proxyFilePath); | ||
logger.info('proxyUrl', proxyUrl); | ||
|
||
return promisedWriteFile(proxyFilePath, proxyUrl); | ||
}; | ||
|
||
const getProxy = async () => promisedReadFile(proxyFilePath); | ||
const getProxy = async () => { | ||
logger.info('getProxy fn'); | ||
logger.info('proxyFilePath', proxyFilePath); | ||
|
||
return promisedReadFile(proxyFilePath); | ||
}; | ||
|
||
module.exports = { | ||
setProxy, | ||
getProxy | ||
getProxy, | ||
}; |