update chara-ish fields on profile save

This commit is contained in:
Tau
2019-11-06 17:28:29 -05:00
parent 8d74a0dc0e
commit 5bca6e8f70
3 changed files with 12 additions and 2 deletions
+6
View File
@@ -7,6 +7,7 @@ export async function saveProfile(
req: SaveProfileRequest
): Promise<GenericResponse> {
const profile = await w.profile().load(req.profileId);
const chara = await w.chara().load(req.profileId);
await Promise.all([
w.profile().save(req.profileId, {
@@ -16,6 +17,11 @@ export async function saveProfile(
fame: req.fame,
dpoint: req.dpoint,
}),
w.chara().save(req.profileId, {
...chara,
title: req.title,
background: req.background,
}),
w.car().save(req.profileId, req.car),
w.story().save(req.profileId, req.story),
w.titles().save(req.profileId, req.titles),