refactor: update pet action handling and restructure pet types for better clarity

This commit is contained in:
2025-02-01 15:33:42 -03:00
parent 8875eb75af
commit a85a80938b
11 changed files with 226 additions and 216 deletions

View File

@@ -28,7 +28,7 @@ export async function createPet(data: PetCreationRequest): Promise<Pet> {
export async function updatePetAction(petId: string, data: PetUpdateActionRequest): Promise<Pet> {
try {
const response = await api.put<Pet>(`/api/v1/pet/${petId}/action/gather`, data);
const response = await api.put<Pet>(`/api/v1/pet/${petId}/action`, data);
return response.data;
} catch (error: any) {
console.error('Failed to update pet action:', error.message);