Prepare apiService for base url.

environments/dev/deployments/1
Roger Braun 8 years ago
parent 2147807fa0
commit fd4cd6d687

@ -15,6 +15,12 @@ const MEDIA_UPLOAD_URL = '/api/statusnet/media/upload'
// import { param, ajax } from 'jquery';
// import { merge } from 'lodash';
let fetch = (url, options) => {
const baseUrl = ''
const fullUrl = baseUrl + url
return window.fetch(fullUrl, options)
}
const authHeaders = (user) => {
if (user) {
return { 'Authorization': `Basic ${btoa(`${user.username}:${user.password}`)}` }

Loading…
Cancel
Save