- [API] Segregated API files, Implemented spells-list, component that calls the API
This commit is contained in:
14
client/api/spellsRepository.js
Normal file
14
client/api/spellsRepository.js
Normal 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}`)
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user