fix: Miscellaneous improvements
This commit is contained in:
parent
8d4bf5f56e
commit
946036077c
8
lib/pushToMongo.js
Normal file
8
lib/pushToMongo.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import axios from "axios"
|
||||
|
||||
export async function pushToMongo(data){
|
||||
let response = await axios.post('http://metaforecast-twitter-bot.herokuapp.com/utility-function-extractor', {
|
||||
data: data
|
||||
})
|
||||
console.log(response)
|
||||
}
|
|
@ -8,6 +8,7 @@ import { DisplayElement } from '../lib/displayElement'
|
|||
import { DisplayAsMarkdown } from '../lib/displayAsMarkdown'
|
||||
import { CreateTableWithDistances } from '../lib/findPaths'
|
||||
import { TextAreaForJson } from "../lib/textAreaForJson"
|
||||
import { pushToMongo } from "../lib/pushToMongo"
|
||||
|
||||
let increasingList = (n) => Array.from(Array(n).keys())
|
||||
let buildLinks = quantitativeComparisons => quantitativeComparisons.map(([element1, element2, distance]) => ({ source: element1, target: element2, distance: distance }))
|
||||
|
@ -223,6 +224,7 @@ export default function Home({ listOfElementsDefault }) {
|
|||
setSliderValue(0)
|
||||
if (successStatus) {
|
||||
let jsObject = nicelyFormatLinks(quantitativeComparisons, listOfElements)
|
||||
pushToMongo(jsObject)
|
||||
console.log(jsObject)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user