Skip to content

Commit

Permalink
Merge pull request #1469 from smartcontractkit/chores/add-operator-ti…
Browse files Browse the repository at this point in the history
…meout-to-other-verbs

operator post,patch,delete have timeouts
  • Loading branch information
rupurt authored Jul 22, 2019
2 parents 5f04038 + 4678c54 commit 200ca50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions operator_ui/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const get = (path: string, query: object = {}) =>
)

const post = (path: string, body: object = {}) => {
return fetch(formatURI(path), {
return fetchWithTimeout(formatURI(path), {
method: 'POST',
body: JSON.stringify(body),
credentials: 'include',
Expand All @@ -68,7 +68,7 @@ const post = (path: string, body: object = {}) => {
}

const patch = (path: string, body: object) => {
return fetch(formatURI(path), {
return fetchWithTimeout(formatURI(path), {
method: 'PATCH',
body: JSON.stringify(body),
credentials: 'include',
Expand All @@ -80,7 +80,7 @@ const patch = (path: string, body: object) => {
}

const destroy = (path: string, body: object = {}) => {
return fetch(formatURI(path, body), {
return fetchWithTimeout(formatURI(path, body), {
method: 'DELETE',
body: JSON.stringify(body),
credentials: 'include',
Expand Down

0 comments on commit 200ca50

Please sign in to comment.