@empiricalrun/reporter
Advanced tools
Comparing version 0.7.0 to 0.8.0
# @empiricalrun/reporter | ||
## 0.8.0 | ||
### Minor Changes | ||
- 9965bf7: feat: add authorization for all /api calls | ||
## 0.7.0 | ||
@@ -4,0 +10,0 @@ |
@@ -104,12 +104,17 @@ "use strict"; | ||
}); | ||
await fetch(`${DOMAIN}/api/test-runs`, { | ||
const response = await fetch(`${DOMAIN}/api/test-runs`, { | ||
method: "POST", | ||
headers: { | ||
"Content-Type": "application/json", | ||
// TODO: remove this hardcoded value | ||
Authorization: "weQPMWKT", | ||
}, | ||
body, | ||
}); | ||
if (!response.ok) { | ||
throw new Error(`Error sending test-run to DB: ${response.status}`); | ||
} | ||
console.log("Test run sent to DB ✅"); | ||
} | ||
catch (e) { | ||
console.error(`Error sending test-run to DB: ${e.code}`); | ||
console.error(e.message); | ||
@@ -116,0 +121,0 @@ } |
{ | ||
"name": "@empiricalrun/reporter", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "registry": "https://registry.npmjs.org/", |
Sorry, the diff of this file is not supported yet
50569
1165