fix: better naming
This commit is contained in:
parent
6c6403f460
commit
2d97dee80c
@ -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