fix: Unable to save settings when accepting trade policy. #966
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "CyberVenom/SpaceNinjaServer:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +14,4 @@
const trainingResults = getJSONfromString<ISaveSettingsRequest>(String(req.body));
const inventory = await getInventory(accountId);
inventory.Settings = trainingResults.Settings;
training results?
The client wil send the full settings object like so
{"Settings":{"GiftMode":"GIFT_MODE_ALL","FriendInvRestriction":"GIFT_MODE_ALL","GuildInvRestriction":"GIFT_MODE_ALL","ShowFriendInvNotifications":true,"TradingRulesConfirmed":true,"SubscribedToSurveys":true}}
yea that all makes sense, I was just wondering why its called training results :D
Also I was wondering if you know whether these settings are meant to be overwritten in full or whether this situation can exist:
inventory.Settings: { setting1: "something"}
server sends: Settings: { setting2: "something2", setting3: "something3"}
because in that case the old settings would get lost. Just wanna make sure we checked for that
I just forgot to edit the name when i copyt the file.
I was thinking that too but i havet found anything eles to trigger that endpoint
Okey, right.
You could just use Object.Assign(old, new). This way old settings will be overwritten and new added.
It wil use Object.Assign now :)