mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-02 07:49:39 +00:00
* Fixed login incentives header * Added achievement hover * Removed grassy background from editing modal * Fixed loading of other user equipment * Prevented non admins from using habitica official * Fixed challenge loading and leader changing on group reload * Added community guidlines link * Added challenge cloning * Fixed heroes editing
28 lines
781 B
JavaScript
28 lines
781 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, 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;
|
|
}
|