mirror of
https://git.pleroma.social/sjw/pleroma-fe.git
synced 2024-12-23 14:45:09 +01:00
Return empty auth header when we don't have a user.
This commit is contained in:
parent
7c2018108d
commit
3bb2e91dbf
@ -14,7 +14,13 @@ const MEDIA_UPLOAD_URL = '/api/statusnet/media/upload'
|
||||
// import { param, ajax } from 'jquery';
|
||||
// import { merge } from 'lodash';
|
||||
|
||||
const authHeaders = (user) => ({ 'Authorization': `Basic ${btoa(`${user.username}:${user.password}`)}` })
|
||||
const authHeaders = (user) => {
|
||||
if (user) {
|
||||
return { 'Authorization': `Basic ${btoa(`${user.username}:${user.password}`)}` }
|
||||
} else {
|
||||
return { }
|
||||
}
|
||||
}
|
||||
|
||||
const fetchTimeline = ({timeline, credentials, since = false, until = false}) => {
|
||||
const timelineUrls = {
|
||||
|
Loading…
Reference in New Issue
Block a user