Skip to content

Commit

Permalink
fix: some errors with types
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAlbDR committed Feb 16, 2024
1 parent 6ad7c9a commit 04198f6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions prisma/migrations/20240215231249_num_favs/migration.sql

This file was deleted.

1 change: 0 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ model Animal {
numFavs Int @default(0)
images String[]
easyTrain Boolean
numFavs Int @default(0)
energyLevel energy
moltingAmount molting
status status_pet @default(awaiting_home)
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/services/animal.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export class AnimalService {

const emails = (favs && favs.userFav.map((user) => user.email)) || [];

emails?.forEach((email) =>
emails?.forEach((email: string) =>
this.producerService.addToEmailQueue(
{ ...updateQuery, email },
'animal-changed-notification'
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class UserService {
await prisma.user.delete({ where: { email: userToDelete.email } });

const imagesToDelete =
userToDelete.shelter?.images.map((image) => image) || [];
userToDelete.shelter?.images.map((image: string) => image) || [];

if (imagesToDelete.length > 0)
await this.s3Service.deleteFiles(imagesToDelete);
Expand Down

0 comments on commit 04198f6

Please sign in to comment.