Fix upload authentication - add authorization header
This commit is contained in:
parent
619c629b6b
commit
2622d0fb79
|
|
@ -153,6 +153,9 @@ export default function AIModerationPage() {
|
||||||
const response = await fetch('/api/v1/admin/upload-test-image', {
|
const response = await fetch('/api/v1/admin/upload-test-image', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: formData,
|
body: formData,
|
||||||
|
headers: {
|
||||||
|
'Authorization': `Bearer ${localStorage.getItem('token') || ''}`,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue