11 lines
498 B
JavaScript
11 lines
498 B
JavaScript
import axios from 'axios'
|
|
|
|
export const api = {
|
|
meta: () => axios.get('/api/meta').then((r) => r.data),
|
|
refresh: () => axios.post('/api/refresh').then((r) => r.data),
|
|
fetchHeroes: () => axios.get('/api/heroes').then((r) => r.data),
|
|
saveHeroes: (heroes) => axios.post('/api/heroes', { heroes }).then((r) => r.data),
|
|
applyHeroes: (heroes) => axios.post('/api/apply', { heroes }).then((r) => r.data),
|
|
exportCsv: (heroes) => axios.post('/api/export-csv', { heroes }).then((r) => r.data),
|
|
}
|