Admin: get sports list
This commit is contained in:
17
mpwo_client/src/mwpoApi/index.js
Normal file
17
mpwo_client/src/mwpoApi/index.js
Normal 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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user