fix: Unable to save settings when accepting trade policy. #966
@ -11,10 +11,10 @@ interface ISaveSettingsRequest {
 | 
				
			|||||||
const saveSettingsController: RequestHandler = async (req, res): Promise<void> => {
 | 
					const saveSettingsController: RequestHandler = async (req, res): Promise<void> => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const trainingResults = getJSONfromString<ISaveSettingsRequest>(String(req.body));
 | 
					    const settingResults = getJSONfromString<ISaveSettingsRequest>(String(req.body));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const inventory = await getInventory(accountId);
 | 
					    const inventory = await getInventory(accountId);
 | 
				
			||||||
    inventory.Settings = trainingResults.Settings;
 | 
					    inventory.Settings = settingResults.Settings;
 | 
				
			||||||
    await inventory.save();
 | 
					    await inventory.save();
 | 
				
			||||||
    res.json(inventory.Settings);
 | 
					    res.json(inventory.Settings);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user