Skip to content

Commit 12b5d5f

Browse files
author
Ricardo Gama
committed
Release 2.0.0
1 parent 5bd5854 commit 12b5d5f

4 files changed

Lines changed: 20 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [v2.0.0](https://github.com/uphold/uphold-sdk-javascript/releases/tag/v2.0.0) (2017-05-24)
4+
- Add otp argument to .updateMe() [\#4](https://github.com/uphold/uphold-sdk-javascript/pull/4) ([ricardogama](https://github.com/ricardogama))
5+
- Update build:browser script to update dependencies [\#3](https://github.com/uphold/uphold-sdk-javascript/pull/3) ([ricardogama](https://github.com/ricardogama))
6+
37
## [v1.0.1](https://github.com/uphold/uphold-sdk-javascript/releases/tag/v1.0.1) (2017-05-19)
48
- Fix file name on webpack configuration [\#2](https://github.com/uphold/uphold-sdk-javascript/pull/2) ([ricardogama](https://github.com/ricardogama))
59
- Fix broken badges [\#1](https://github.com/uphold/uphold-sdk-javascript/pull/1) ([ricardogama](https://github.com/ricardogama))

dist/browser/uphold-sdk-javascript.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core/actions/user.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
Object.defineProperty(exports, "__esModule", {
44
value: true
55
});
6+
7+
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; };
8+
69
exports.getMe = getMe;
710
exports.updateMe = updateMe;
811

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

19-
function updateMe(_ref, options) {
22+
function updateMe(_ref, otp, options) {
2023
let address = _ref.address,
2124
birthdate = _ref.birthdate,
2225
country = _ref.country,
@@ -27,7 +30,7 @@ function updateMe(_ref, options) {
2730
state = _ref.state,
2831
username = _ref.username;
2932

30-
return this.api('/me', (0, _lodash2.default)({
33+
options = (0, _lodash2.default)({
3134
body: {
3235
address: address,
3336
birthdate: birthdate,
@@ -40,5 +43,13 @@ function updateMe(_ref, options) {
4043
username: username
4144
},
4245
method: 'patch'
43-
}, options));
46+
}, options);
47+
48+
if (otp) {
49+
options.headers = _extends({
50+
'otp-token': otp
51+
}, options.headers);
52+
}
53+
54+
return this.api('/me', options);
4455
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uphold/uphold-sdk-javascript",
3-
"version": "1.0.1",
3+
"version": "2.0.0",
44
"description": "Uphold SDK for JavasScript",
55
"keywords": [
66
"api",

0 commit comments

Comments
 (0)