forked from OpenWF/SpaceNinjaServer
chore: use inventory projection for saveSettingsController
This commit is contained in:
parent
2516af9acc
commit
2b9eb1844d
@ -13,7 +13,7 @@ const saveSettingsController: RequestHandler = async (req, res): Promise<void> =
|
||||
|
||||
const settingResults = getJSONfromString<ISaveSettingsRequest>(String(req.body));
|
||||
|
||||
const inventory = await getInventory(accountId);
|
||||
const inventory = await getInventory(accountId, "Settings");
|
||||
inventory.Settings = Object.assign(inventory.Settings ?? {}, settingResults.Settings);
|
||||
await inventory.save();
|
||||
res.json({ Settings: inventory.Settings });
|
||||
|
Loading…
x
Reference in New Issue
Block a user