Skip to content

Commit

Permalink
🐛 Add missing authorization header to image upload
Browse files Browse the repository at this point in the history
  • Loading branch information
leodr committed Mar 2, 2021
1 parent 20f3b0e commit e64f7a5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils/imageUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ export default async function imageUpload(
if (personId) headers.set('X-Person-Id', personId);
if (siteId) headers.set('X-Site-Id', siteId);

if (chayns.env.user.isAuthenticated) {
headers.set(
'Authorization',
`bearer ${chayns.env.user.tobitAccessToken}`
);
}

/** @type {string | ArrayBuffer} */
let body;

Expand Down

0 comments on commit e64f7a5

Please sign in to comment.