Skip to content

Commit

Permalink
Add region to environment creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanblock committed Dec 18, 2023
1 parent 09458a1 commit 702a846
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/_write.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const { version } = require('../package.json')
* @param {object} [body] passthru POST body
* @returns {Promise<object>}
*/
module.exports = async function write ({ scope = 'apps', token, _staging, appID, envID, path }, body) {
module.exports = async function write (params, body) {
let { scope = 'apps', token, _staging, appID, envID, path } = params
const base = await getBase(_staging)
if (process.env.__BEGIN_TEST_URL__) token = 'token_redacted'
if (!token) throw Error('missing_token')
Expand Down
4 changes: 2 additions & 2 deletions src/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ module.exports = {
* @description add an environment
* @param {BaseParams & UniqueApp & {name: string, envName: string}} options
*/
async add ({ token, appID, name, envName, _staging }) {
async add ({ token, appID, name, envName, region, _staging }) {
if (!appID) throw Error('missing_appID')
return write({ token, appID, _staging }, { envName, name })
return write({ token, appID, _staging }, { envName, name, region })
},

/**
Expand Down

0 comments on commit 702a846

Please sign in to comment.