16b244d5c6
* Added initial challenge pages * Added challenge item and find guilds page * Added challenge detail * Added challenge modals * Ported over challenge service code * Ported over challenge ctrl code * Added styles and column * Minor modal updates * Removed duplicate keys * Fixed casing * Added initial chat component * Added copy as todo modal * Added sync * Added chat to groups * Fixed lint * Added notification service * Added tag services * Added notifications * Added hall * Added analytics * Added http interceptor * Added initial autocomplete * Added initial footer component * Began coding and designing footer * Added inital hall * Ported over inital group plan ctrl code * Added initial invite modal * Added initial member detail modal * Added initial notification menu * Ported over inital notification code * Fixed import line * Fixed autocomplete import casing
31 lines
805 B
JavaScript
31 lines
805 B
JavaScript
import axios from 'axios';
|
|
|
|
export async function getHeroes () {
|
|
let url = '/api/v3/hall/heroes';
|
|
let response = await axios.get(url);
|
|
return response.data.data;
|
|
}
|
|
|
|
export async function getHero (store, payload) {
|
|
let url = `/api/v3/hall/heroes/${payload.uuid}`;
|
|
let response = await axios.get(url);
|
|
return response.data.data;
|
|
}
|
|
|
|
export async function updateHero (store, payload) {
|
|
let url = `/api/v3/hall/heroes/${payload.heroDetails._id}`;
|
|
let response = await axios.put(url, {
|
|
heroDetails: payload.heroDetails,
|
|
});
|
|
return response.data.data;
|
|
}
|
|
|
|
export async function getPatrons (store, payload) {
|
|
let page = 0;
|
|
if (payload.page) page = payload.page;
|
|
|
|
let url = `/api/v3/hall/patrons/?page=${page}`;
|
|
let response = await axios.get(url);
|
|
return response.data.data;
|
|
}
|