From 5332022c039ec96cb416f68efda3f080a091c1d6 Mon Sep 17 00:00:00 2001 From: roundaboutluke Date: Mon, 8 Jan 2024 09:46:27 +0000 Subject: [PATCH] fastify version uplift and raid tracking API form upgrade (#889) * fastify version uplift to v4.25.2 * Update raid tracking API for forms all credit to @kbtbc --- package.json | 2 +- src/routes/apiTrackingRaid.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e5b8e792d..2034bf652 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "deep-object-diff": "^1.1.9", "discord.js": "^13.16.0", "fast-json-stable-stringify": "^2.1.0", - "fastify": "^4.23.0", + "fastify": "^4.25.2", "flat-cache": "^3.0.4", "form-data": "^4.0.0", "geo-tz": "^7.0.7", diff --git a/src/routes/apiTrackingRaid.js b/src/routes/apiTrackingRaid.js index cf5dc18bf..597fb0171 100644 --- a/src/routes/apiTrackingRaid.js +++ b/src/routes/apiTrackingRaid.js @@ -102,7 +102,7 @@ module.exports = async (fastify, options, next) => { team: row.team >= 0 && row.team <= 4 ? row.team : 4, // carefully chosen to get nulls/undefined to 4 but allow 0 clean: +defaultTo(+row.clean, 0), level: +level, - form: 0, + form: +defaultTo(row.form, 0), move: +defaultTo(row.move, 9000), evolution: +defaultTo(row.evolution, 9000), gym_id: row.gym_id ? row.gym_id : null,