From 4739e903c0538ad78e57a0f9b6dcae0db526326d Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 25 Jun 2024 10:30:09 -0400 Subject: [PATCH] Changing to new Nuclear Family API backend for Revive Requests (#800) * Change nukefamily API endpoint to new one The Nuclear Family is changing to using a new API backend and now has a new URL. * Altering nukefamily revive request to use new endpoint The API backend for the Nuke Family is being switched to use a newly updated backend * Add new changelog version for Nuke endpoint changes * Update changelog.json --------- Co-authored-by: Sashank <76554862+Sashank999@users.noreply.github.com> --- extension/changelog.json | 2 +- extension/scripts/features/revive-request/ttReviveRequest.js | 4 ++-- extension/scripts/global/functions/api.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extension/changelog.json b/extension/changelog.json index 04c9788e7..abc0162e0 100644 --- a/extension/changelog.json +++ b/extension/changelog.json @@ -6,7 +6,7 @@ "logs": { "features": [{ "message": "Show total value of an opened supply pack.", "contributor": "Conrado" }], "fixes": [{ "message": "Fixing (and then reverting) racing features.", "contributor": "TheFoxMan" }], - "changes": [], + "changes": [{ "message": "Changing the Nuclear Family revive request API endpoint to use new URL", "contributor": "Fogest" }], "removed": [] } }, diff --git a/extension/scripts/features/revive-request/ttReviveRequest.js b/extension/scripts/features/revive-request/ttReviveRequest.js index 125ebdc8a..d72470d56 100644 --- a/extension/scripts/features/revive-request/ttReviveRequest.js +++ b/extension/scripts/features/revive-request/ttReviveRequest.js @@ -114,9 +114,9 @@ if (provider === "nuke") { const response = await fetchData("nukefamily", { - section: "dev/reviveme.php", + section: "api/revive-request", method: "POST", - body: { uid: id, Player: name, Faction: faction, Country: country, AppInfo: source }, + body: { torn_player_id: id, torn_player_name: name, torn_player_country: country, app_info: source }, relay: true, silent: true, succeedOnError: true, diff --git a/extension/scripts/global/functions/api.js b/extension/scripts/global/functions/api.js index c2329f309..cb095bd66 100644 --- a/extension/scripts/global/functions/api.js +++ b/extension/scripts/global/functions/api.js @@ -14,7 +14,7 @@ const FETCH_PLATFORMS = { yata: "https://yata.yt/", tornstats: "https://www.tornstats.com/", torntools: "https://torntools.gregork.com/", - nukefamily: "https://www.nukefamily.org/", + nukefamily: "https://nuke.family/", uhc: "https://tornuhc.eu/", imperium: "https://inq.mavri.dev/", hela: "https://api.no1irishstig.co.uk/",