feat: build compact BO2 grind companion with cumulative ranks
Some checks failed
Test and deploy staging / staging (push) Failing after 2m50s
Some checks failed
Test and deploy staging / staging (push) Failing after 2m50s
This commit is contained in:
@@ -114,6 +114,19 @@ try {
|
||||
if (Number(catalog.cod_games) < 7) {
|
||||
throw new Error('Call of Duty catalog has not been seeded in this database');
|
||||
}
|
||||
const [bo2] = await client`select rules,
|
||||
(select count(*)::int from tracker_items i where i.game_id=g.id and i.kind='weapon') as weapons,
|
||||
(select count(*)::int from tracker_items i where i.game_id=g.id and i.kind='weapon' and i.icon is not null) as pictures
|
||||
from tracker_games g where slug='black-ops-2'`;
|
||||
if (
|
||||
!bo2 ||
|
||||
bo2.rules.rankCaps?.weaponPrestige !== 2 ||
|
||||
bo2.rules.rankCaps?.weaponLevelsByClass?.['Assault Rifles'] !== 17 ||
|
||||
bo2.weapons < 40 ||
|
||||
bo2.pictures < 39
|
||||
) {
|
||||
throw new Error('Seed the updated BO2 catalog and artwork before deploying');
|
||||
}
|
||||
} finally {
|
||||
await client.end();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user