fix: add auth token to all API calls (prompts, insights, pipeline)
This commit is contained in:
1 parent
89b6c0b072
commit
5091dfd1ce
5 files changed
+9
-19
No files matched your search
@@ -924,7 +924,7 @@ export default function History() {
|
||||
setLoadingSlug(slug)
|
||||
try {
|
||||
const pid=localStorage.getItem('bodytrack_active_profile')||''
|
||||
const r=await fetch(`/api/insights/run/${slug}`,{method:'POST',headers:pid?{'X-Profile-Id':pid}:{}})
|
||||
const r=await api.runInsight(slug)
|
||||
if(!r.ok) throw new Error(await r.text())
|
||||
const ins=await api.latestInsights()
|
||||
setInsights(Array.isArray(ins)?ins:[])
|
||||
|
||||
Reference in new issue
Block a user