add ingest

This commit is contained in:
derpystuff 2024-04-11 23:41:24 +02:00
parent 3e4d5258ae
commit 4c8d717e9a
4 changed files with 30 additions and 2 deletions

View file

@ -38,4 +38,14 @@ module.exports.basecamp = async function (log, content = ""){
console.log(e)
throw "Basecamp request failed."
}
}
module.exports.ingest = async function (event, type = "generic"){
try{
let r = await superagent.get(`${process.env.INGEST_SERVICE_HOST}/d/${type}/${event}`)
.set("x-ingest-client", process.env.INGEST_SERVICE_CLIENT)
}catch(e){
console.log(e)
console.log("ingest failed")
}
}