Skip to content

Commit

Permalink
Use inventory's timestamp instead of island's last update to calculat…
Browse files Browse the repository at this point in the history
…e resources
  • Loading branch information
mfcochauxlaberge committed Jun 19, 2024
1 parent a048787 commit 6c1f059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/Inventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DateTime, Duration } from 'luxon';
class Inventory {
constructor(obj: any) {
this.id = obj?.id || '';
this.lastUpdate = DateTime.fromISO(obj?.island?.lastUpdateAt);
this.lastUpdate = DateTime.fromISO(obj.timestamp);
this.populationUsed = obj?.populationUsed || 0;
this.populationFree = obj?.populationFree || 0;
this.populationTotal = obj?.populationTotal || 0;
Expand Down

0 comments on commit 6c1f059

Please sign in to comment.