@riiid/santa-sdk-js
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -155,3 +155,3 @@ const nock = require('nock'); | ||
nock(BASE_URL) | ||
.post(PATH_FACEBOOK, {facebook_token: snsToken}) | ||
.post(PATH_FACEBOOK, {facebookToken: snsToken}) | ||
.reply(500); | ||
@@ -166,3 +166,3 @@ return req.getTokenWithSNS({token, snsToken, type: 'facebook'}) | ||
nock(BASE_URL) | ||
.post(PATH_KAKAO, {kakao_token: snsToken}) | ||
.post(PATH_KAKAO, {kakaoToken: snsToken}) | ||
.reply(500); | ||
@@ -182,3 +182,3 @@ return req.getTokenWithSNS({token, snsToken, type: 'kakao'}) | ||
nock(BASE_URL) | ||
.post(PATH_FACEBOOK, {facebook_token: snsToken}) | ||
.post(PATH_FACEBOOK, {facebookToken: snsToken}) | ||
.reply(500); | ||
@@ -194,3 +194,3 @@ return req.getTokenWithSNS$({token, snsToken, type: 'facebook'}) | ||
nock(BASE_URL) | ||
.post(PATH_KAKAO, {kakao_token: snsToken}) | ||
.post(PATH_KAKAO, {kakaoToken: snsToken}) | ||
.reply(500); | ||
@@ -253,5 +253,5 @@ return req.getTokenWithSNS$({token, snsToken, type: 'kakao'}) | ||
test('createAnonymous client_code must be defined', () => { | ||
test('createAnonymous clientCode must be defined', () => { | ||
expect(() => req.createAnonymous()) | ||
.toThrowError('client_code must be defined'); | ||
.toThrowError('clientCode must be defined'); | ||
}); | ||
@@ -261,5 +261,5 @@ | ||
nock(BASE_URL) | ||
.post(PATH_ANONYMOUS, {client_code: token}) | ||
.post(PATH_ANONYMOUS, {clientCode: token}) | ||
.reply(500); | ||
return req.createAnonymous(client_code = token) | ||
return req.createAnonymous(clientCode = token) | ||
.catch(err => { | ||
@@ -272,5 +272,5 @@ expect(err.message).toMatchSnapshot(); | ||
nock(BASE_URL) | ||
.post(PATH_ANONYMOUS, {client_code: token}) | ||
.post(PATH_ANONYMOUS, {clientCode: token}) | ||
.reply(500); | ||
return req.createAnonymous$(client_code = token).subscribe(null, err => { | ||
return req.createAnonymous$(clientCode = token).subscribe(null, err => { | ||
expect(err.message).toMatchSnapshot(); | ||
@@ -277,0 +277,0 @@ done(); |
@@ -77,6 +77,6 @@ const {from} = require('rxjs'); | ||
case 'facebook': | ||
return this._post(PATH_FACEBOOK, {facebook_token: snsToken}, | ||
return this._post(PATH_FACEBOOK, {facebookToken: snsToken}, | ||
{...!!token && this._token(token)}); | ||
case 'kakao': | ||
return this._post(PATH_KAKAO, {kakao_token: snsToken}, | ||
return this._post(PATH_KAKAO, {kakaoToken: snsToken}, | ||
{...!!token && this._token(token)}); | ||
@@ -114,12 +114,12 @@ default: | ||
createAnonymous(client_code) { | ||
if (!client_code) { | ||
throw new Error('client_code must be defined'); | ||
createAnonymous(clientCode) { | ||
if (!clientCode) { | ||
throw new Error('clientCode must be defined'); | ||
}; | ||
return this._post(PATH_ANONYMOUS, {client_code}); | ||
return this._post(PATH_ANONYMOUS, {clientCode}); | ||
} | ||
createAnonymous$(client_code) { | ||
return from(this.createAnonymous(client_code)); | ||
createAnonymous$(clientCode) { | ||
return from(this.createAnonymous(clientCode)); | ||
} | ||
} |
{ | ||
"name": "@riiid/santa-sdk-js", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Santa SDK for Javascript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50580