fix: Unable to save settings when accepting trade policy. #966

Merged
OrdisPrime merged 5 commits from :main into main 2025-02-19 14:09:02 -08:00
Showing only changes of commit 2d97dee80c - Show all commits

View File

@ -11,10 +11,10 @@ interface ISaveSettingsRequest {
const saveSettingsController: RequestHandler = async (req, res): Promise<void> => {
const accountId = await getAccountIdForRequest(req);
const trainingResults = getJSONfromString<ISaveSettingsRequest>(String(req.body));
const settingResults = getJSONfromString<ISaveSettingsRequest>(String(req.body));
const inventory = await getInventory(accountId);
inventory.Settings = trainingResults.Settings;
inventory.Settings = settingResults.Settings;
await inventory.save();
res.json(inventory.Settings);
};