Skip to content

Commit

Permalink
Rename config to ssm
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Dec 6, 2018
1 parent 62a6cef commit a8fa934
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions handlers/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const { getResponse, getOptions } = require('../lib')
const { getResponse, getOptionsFromSsm } = require('../lib')

const name = 'aws-lambda-edge'
const region = 'us-east-1'
Expand All @@ -15,7 +15,7 @@ const createHandler = stage => (event, context, callback) => {
callback(error)
}
}
getOptions({ region, stage, name }, handleRequest)
getOptionsFromSsm({ region, stage, name }, handleRequest)
}

const formatReq = event => {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict'

module.exports.getOptions = require('./config')
module.exports.getOptionsFromSsm = require('./ssm')
module.exports.getResponse = require('./response')
4 changes: 2 additions & 2 deletions lib/config.js → lib/ssm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const parameterNames = [
'assetDomain'
]

const getOptions = ({ region, stage, name } = {}, callback) => {
const getOptionsFromSsm = ({ region, stage, name } = {}, callback) => {
getParameters({ region, stage, name }, (err, data) => {
try {
if (err) return callback(err)
Expand Down Expand Up @@ -52,4 +52,4 @@ const getParameters = ({ region, stage, name }, callback) => {
}
}

module.exports = getOptions
module.exports = getOptionsFromSsm

0 comments on commit a8fa934

Please sign in to comment.