tmp-discussion-utils
Advanced tools
Comparing version 5.5.1 to 5.5.2
@@ -61,47 +61,3 @@ "use strict"; | ||
//=================================Community POST/PUT/DELETE api ============================== | ||
// function addThread(host) { | ||
// return ({ type, topic, content, userId, userName, token }) => { | ||
// return (dispatch, getState) => { | ||
// const body = JSON.stringify({ | ||
// author: { | ||
// id: userId, | ||
// name: userName, | ||
// anonymous: false | ||
// }, | ||
// title: topic, | ||
// views: 0, | ||
// class: ["overwatchselect", type], | ||
// content: content | ||
// }); | ||
// | ||
// return fetch(urlJoin(host, `/item`), { | ||
// body, | ||
// headers: { | ||
// "Content-Type": "application/json" | ||
// }, | ||
// credentials: "include", | ||
// method: "POST" | ||
// }) | ||
// .then(response => { | ||
// const { status, statusText } = response; | ||
// | ||
// // TODO: is this necessary for a POST request? | ||
// if (response.status >= 200 && response.status < 300) { | ||
// dispatch(fetchThreadsIfNeeded(type)); | ||
// return response; | ||
// } else { | ||
// const error = new Error(statusText); | ||
// console.log(`Response returned an error for : ${error.message}`); | ||
// | ||
// return Promise.reject(error); | ||
// } | ||
// }) | ||
// .then(response => response.json()) | ||
// .then(error => console.log(error)); | ||
// }; | ||
// }; | ||
// } | ||
function addComment(host) { | ||
@@ -307,6 +263,5 @@ return function (_ref2) { | ||
headers: { | ||
Accept: "application/json", | ||
"Content-Type": "application/x-www-form-urlencoded", | ||
Authorization: token | ||
"Content-Type": "application/json" | ||
}, | ||
credentials: "include", | ||
method: "PUT" | ||
@@ -313,0 +268,0 @@ }).then(function (response) { |
{ | ||
"name": "tmp-discussion-utils", | ||
"version": "5.5.1", | ||
"version": "5.5.2", | ||
"description": "tmp-discussion-utils", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
158936
1082