refactor: reorganize pet action types and update related components for improved resource management
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { ApiService } from './index';
|
||||
import { InvItemInteraction, Pet, Resources } from '../../types/Pet';
|
||||
import { PetCreationRequest } from '../../types/PetCreationRequest';
|
||||
import { PetUpdateActionRequest } from '../../types/PetUpdateActionRequest';
|
||||
import { PetActionGathered, PetUpdateActionRequest } from '../../types/PetAction';
|
||||
import { PetSkill, Skill } from '../../types/Skills';
|
||||
|
||||
// Get API service instance
|
||||
@@ -22,8 +22,8 @@ export async function updatePetAction(petId: string, data: PetUpdateActionReques
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function getPetGatheredResources(petId: string): Promise<Resources> {
|
||||
const response = await api.get<Resources>(`/api/v1/pet/${petId}/resources/gathered`);
|
||||
export async function getPetGatheredResources(petId: string): Promise<PetActionGathered[]> {
|
||||
const response = await api.get<PetActionGathered[]>(`/api/v1/pet/${petId}/resources/gathered`);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user