-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
471766e
commit ee82340
Showing
11 changed files
with
160 additions
and
59 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import request from 'request-promise'; | ||
import dotenv from 'dotenv'; | ||
dotenv.config(); | ||
|
||
let downloadedPickList = {}; | ||
export const getPicklistValues = () => downloadedPickList; | ||
|
||
export const pullPickListValues = async () => { | ||
const options = { | ||
method: 'GET', | ||
url: process.env.PICKLIST_URL, | ||
}; | ||
|
||
downloadedPickList = JSON.parse(await request(Object.assign({}, options))); | ||
}; | ||
|
||
export const getDefaultOrganizationList = async () => { | ||
const options = { | ||
method: 'GET', | ||
url: process.env.DEFAULT_ORGANIZATIONS, | ||
}; | ||
|
||
return JSON.parse(await request(Object.assign({}, options))); | ||
}; | ||
|
||
export const serverAvailable = async (server, port) => { | ||
const options = { | ||
method: 'GET', | ||
url: `http://${server}:${port}`, | ||
}; | ||
|
||
try { | ||
await request(Object.assign({}, options)); | ||
return true; | ||
} catch (err) { | ||
if (JSON.stringify(err).includes('Python')) { | ||
console.log('SERVER IS AVAILABLE'); | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
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