Skip to content

Commit 1bfb057

Browse files
authored
Merge pull request #3 from Typeform/os-comments
Open Source comments
2 parents 274b4d8 + fe6850e commit 1bfb057

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22

33
node_js:
4-
- "9"
4+
- "8"
55

66
branches:
77
only:

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"lib": "lib",
88
"test": "tests"
99
},
10+
"engines": {
11+
"node": ">=8"
12+
},
1013
"repository": {
1114
"type": "git",
1215
"url": "git+https://github.com/Typeform/js-api-client.git"
@@ -23,8 +26,7 @@
2326
},
2427
"homepage": "https://github.com/Typeform/js-api-clientk#readme",
2528
"dependencies": {
26-
"axios": "^0.18.0",
27-
"in-publish": "^2.0.0"
29+
"axios": "^0.18.0"
2830
},
2931
"devDependencies": {
3032
"@babel/cli": "^7.0.0-beta.44",
@@ -43,6 +45,7 @@
4345
"eslint-config-prettier": "^2.9.0",
4446
"eslint-plugin-prettier": "^2.6.0",
4547
"husky": "^0.14.3",
48+
"in-publish": "^2.0.0",
4649
"jest": "^22.4.3",
4750
"lint-staged": "^7.0.4",
4851
"prettier": "^1.12.1",

src/create-client.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import axios from 'axios'
22

3-
export const clientConstructor = ({ token }) => {
3+
export const clientConstructor = ({ token, ...options }) => {
44
return axios.create({
55
baseURL: 'https://api.typeform.com',
66
headers: {
77
Authorization: `bearer ${token}`
8-
}
8+
},
9+
...options
910
})
1011
}

src/forms.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ export const getMessages = (http, { uid }) => {
6464
})
6565
}
6666

67-
export const updateMessages = (http, { uid }) => {
67+
export const updateMessages = (http, { uid, data }) => {
6868
return http.request({
6969
method: 'put',
70-
url: `/forms/${uid}/messages`
70+
url: `/forms/${uid}/messages`,
71+
data
7172
})
7273
}

0 commit comments

Comments
 (0)