forked from AkkomaGang/akkoma-fe
Return empty auth header when we don't have a user.
This commit is contained in:
parent
7c2018108d
commit
3bb2e91dbf
1 changed files with 7 additions and 1 deletions
|
@ -14,7 +14,13 @@ const MEDIA_UPLOAD_URL = '/api/statusnet/media/upload'
|
||||||
// import { param, ajax } from 'jquery';
|
// import { param, ajax } from 'jquery';
|
||||||
// import { merge } from 'lodash';
|
// 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 fetchTimeline = ({timeline, credentials, since = false, until = false}) => {
|
||||||
const timelineUrls = {
|
const timelineUrls = {
|
||||||
|
|
Loading…
Reference in a new issue