mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-18 02:58:48 +00:00
Fix post topics being added to followed topics list
This commit is contained in:
parent
4f2e07756d
commit
e7afac9a19
@ -84,23 +84,23 @@ class Writing_Microblogs extends Component {
|
|||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
console.log(postData.microBlogTopics);
|
console.log(postData.microBlogTopics);
|
||||||
let topicPromises = [];
|
// let topicPromises = [];
|
||||||
postData.microBlogTopics.forEach(topic => {
|
// postData.microBlogTopics.forEach(topic => {
|
||||||
topicPromises.push(axios
|
// topicPromises.push(axios
|
||||||
.post("/putTopic", {
|
// .post("/putTopic", {
|
||||||
following: topic
|
// following: topic
|
||||||
})
|
// })
|
||||||
.then(res => {
|
// .then(res => {
|
||||||
console.log(res.data);
|
// console.log(res.data);
|
||||||
})
|
// })
|
||||||
.catch(err => {
|
// .catch(err => {
|
||||||
console.error(err);
|
// console.error(err);
|
||||||
})
|
// })
|
||||||
)
|
// )
|
||||||
});
|
// });
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
topicPromises.push(postPromise);
|
// topicPromises.push(postPromise);
|
||||||
Promise.all(topicPromises)
|
Promise.all([postPromise])
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
value: "",
|
value: "",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user