- [API] Segregated API files, Implemented spells-list, component that calls the API

This commit is contained in:
Alexis
2020-04-06 16:39:55 +02:00
parent 37f4913d3e
commit 042c205ce4
11 changed files with 169 additions and 29 deletions

View File

@@ -0,0 +1,14 @@
import api from './api'
// URL for spells
const resource = "/spells"
// CRUD methods for spells
export default {
getSpells() {
return api.get(`${resource}`)
},
getSpell(id) {
return api.get(`${resource}?id=${id}`)
},
}