Admin: get sports list

This commit is contained in:
Sam
2018-04-29 18:23:46 +02:00
parent c8f1b4aebe
commit cb8c24a932
6 changed files with 111 additions and 1 deletions

View File

@ -0,0 +1,17 @@
import { apiUrl } from '../utils'
export default class MpwoApi {
static getData(target) {
const request = new Request(`${apiUrl}${target}`, {
method: 'GET',
headers: new Headers({
'Content-Type': 'application/json',
Authorization: `Bearer ${window.localStorage.getItem('authToken')}`,
}),
})
return fetch(request)
.then(response => response.json())
.catch(error => error)
}
}