Refactor repository layer (and implement garage)

This commit is contained in:
Tau
2019-11-06 17:28:29 -05:00
parent f224e466c5
commit a4a6550abb
31 changed files with 452 additions and 238 deletions
+5 -2
View File
@@ -6,8 +6,11 @@ export async function saveStocker(
w: World,
req: SaveStockerRequest
): Promise<GenericResponse> {
await w.backgrounds().save(req.profileId, req.backgrounds);
await w.chara().save(req.profileId, req.chara);
await Promise.all([
w.backgrounds().saveAll(req.profileId, req.backgrounds),
w.chara().save(req.profileId, req.chara),
w.car().saveSelection(req.profileId, req.selectedCar),
]);
return { type: "generic_res" };
}