Skip to content

Commit

Permalink
fix: accessKeyID => accessKeyId (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored and gxcsoccer committed Oct 17, 2018
1 parent 1095010 commit d6b6fc6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const httpclient = require('urllib');
const Consumer = require('ali-ons').Consumer;
const consumer = new Consumer({
httpclient,
accessKeyID: 'your-AccessKeyID',
accessKeyId: 'your-accessKeyId',
accessKeySecret: 'your-AccessKeySecret',
consumerGroup: 'your-consumer-group',
// isBroadcast: true,
Expand All @@ -57,7 +57,7 @@ const Message = require('ali-ons').Message;

const producer = new Producer({
httpclient,
accessKeyID: 'your-AccessKeyID',
accessKeyId: 'your-accessKeyId',
accessKeySecret: 'your-AccessKeySecret',
producerGroup: 'your-producer-group',
});
Expand Down
2 changes: 1 addition & 1 deletion example/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const env = process.env;
// export ALI_SDK_ONS_TOPIC=your-topic

module.exports = {
accessKeyID: env.ALI_SDK_ONS_ID,
accessKeyId: env.ALI_SDK_ONS_ID,
accessKeySecret: env.ALI_SDK_ONS_SECRET,
producerGroup: env.ALI_SDK_ONS_PGROUP,
consumerGroup: env.ALI_SDK_ONS_CGROUP,
Expand Down
4 changes: 2 additions & 2 deletions lib/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class Channel extends Base {
constructor(address, options) {
// 10.18.214.201:8080
const arr = address.split(':');
// support alias: accessKeyID and accessKeySecret
options.accessKey = options.accessKey || options.accessKeyID;
// support alias: accessKeyId and accessKeySecret
options.accessKey = options.accessKey || options.accessKeyId;
options.secretKey = options.secretKey || options.accessKeySecret;
super(Object.assign({
host: arr[0],
Expand Down

0 comments on commit d6b6fc6

Please sign in to comment.