Skip to content

Commit

Permalink
Release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Gama committed May 24, 2017
1 parent 5bd5854 commit 12b5d5f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [v2.0.0](https://github.com/uphold/uphold-sdk-javascript/releases/tag/v2.0.0) (2017-05-24)
- Add otp argument to .updateMe() [\#4](https://github.com/uphold/uphold-sdk-javascript/pull/4) ([ricardogama](https://github.com/ricardogama))
- Update build:browser script to update dependencies [\#3](https://github.com/uphold/uphold-sdk-javascript/pull/3) ([ricardogama](https://github.com/ricardogama))

## [v1.0.1](https://github.com/uphold/uphold-sdk-javascript/releases/tag/v1.0.1) (2017-05-19)
- Fix file name on webpack configuration [\#2](https://github.com/uphold/uphold-sdk-javascript/pull/2) ([ricardogama](https://github.com/ricardogama))
- Fix broken badges [\#1](https://github.com/uphold/uphold-sdk-javascript/pull/1) ([ricardogama](https://github.com/ricardogama))
Expand Down
2 changes: 1 addition & 1 deletion dist/browser/uphold-sdk-javascript.js

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions dist/core/actions/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Object.defineProperty(exports, "__esModule", {
value: true
});

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

exports.getMe = getMe;
exports.updateMe = updateMe;

Expand All @@ -16,7 +19,7 @@ function getMe(options) {
return this.api('/me', options);
}

function updateMe(_ref, options) {
function updateMe(_ref, otp, options) {
let address = _ref.address,
birthdate = _ref.birthdate,
country = _ref.country,
Expand All @@ -27,7 +30,7 @@ function updateMe(_ref, options) {
state = _ref.state,
username = _ref.username;

return this.api('/me', (0, _lodash2.default)({
options = (0, _lodash2.default)({
body: {
address: address,
birthdate: birthdate,
Expand All @@ -40,5 +43,13 @@ function updateMe(_ref, options) {
username: username
},
method: 'patch'
}, options));
}, options);

if (otp) {
options.headers = _extends({
'otp-token': otp
}, options.headers);
}

return this.api('/me', options);
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uphold/uphold-sdk-javascript",
"version": "1.0.1",
"version": "2.0.0",
"description": "Uphold SDK for JavasScript",
"keywords": [
"api",
Expand Down

0 comments on commit 12b5d5f

Please sign in to comment.