post processing call from front
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {characterControllerApi} from "@/mammon";
|
||||
import {activityControllerApi, characterControllerApi} from "@/mammon";
|
||||
import {defineStore} from "pinia";
|
||||
import {ref} from "vue";
|
||||
import {CharacterResponse} from "@/generated/mammon";
|
||||
@@ -18,9 +18,11 @@ export const useCharactersStore = defineStore('characters', () => {
|
||||
return character;
|
||||
}
|
||||
|
||||
const reloadActivities = (characterId: number): Promise<void> => activityControllerApi.fetchNewActivitiesForCharacter(characterId) as Promise<void>;
|
||||
|
||||
const refresh = () => characterControllerApi.getCharacters().then(response => characters.value = response.data);
|
||||
|
||||
refresh();
|
||||
|
||||
return {characters, findById, refresh};
|
||||
return {characters, findById, reloadActivities, refresh};
|
||||
})
|
||||
Reference in New Issue
Block a user