Skip to content

Commit

Permalink
fix: shelter decay time and visible donation fields
Browse files Browse the repository at this point in the history
  • Loading branch information
fagundesjg committed Jun 7, 2024
1 parent 3bfb5af commit 85c4d83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
25 changes: 1 addition & 24 deletions src/donation-order/donation-order.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,30 +87,7 @@ export class DonationOrderService {
async show(id: string, userId: string) {
const data = await this.prismaService.donationOrder.findUnique({
where: { id, userId },
select: {
id: true,
status: true,
userId: true,
shelter: {
select: {
id: true,
name: true,
},
},
donationOrderSupplies: {
select: {
quantity: true,
supply: {
select: {
name: true,
measure: true,
},
},
},
},
createdAt: true,
updatedAt: true,
},
select: this.donationOrderVisibleFields,
});
return data;
}
Expand Down
4 changes: 2 additions & 2 deletions src/shelter/shelter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export class ShelterService implements OnModuleInit {
shelterSupplies
.map(this.parseShelterSupply)
.filter((f) =>
this.canDecayShelterSupply(f, [SupplyPriority.Urgent], 12),
this.canDecayShelterSupply(f, [SupplyPriority.Urgent], 48),
),

SupplyPriority.Needing,
Expand All @@ -329,7 +329,7 @@ export class ShelterService implements OnModuleInit {
this.canDecayShelterSupply(
f,
[SupplyPriority.Needing, SupplyPriority.Remaining],
48,
72,
),
),
SupplyPriority.UnderControl,
Expand Down

0 comments on commit 85c4d83

Please sign in to comment.