Skip to content

Commit 169e3c1

Browse files
committed
fix(workspaces): set headers for add method
1 parent 237df8c commit 169e3c1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/utils.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,5 @@ export const createMemberPatchQuery = ({ members, operation }) => {
99
}
1010

1111
export const isMemberPropValid = members => {
12-
if (!members || !(typeof members === 'string' || Array.isArray(members))) {
13-
return false
14-
}
15-
16-
return true
12+
return (members && (typeof members === 'string' || Array.isArray(members)))
1713
}

src/workspaces.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ class Workspaces {
1414

1515
return this._http.request({
1616
method: 'post',
17-
url: `/workspaces`,
17+
url: '/workspaces',
18+
headers: {
19+
'Content-Type': 'application/json'
20+
},
1821
data: {
1922
name
2023
}

0 commit comments

Comments
 (0)