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