wip create working(?)

This commit is contained in:
Tau
2019-11-06 17:28:30 -05:00
parent 968e98fbb4
commit a5827da590
21 changed files with 214 additions and 96 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ export async function createProfile(
w: Repositories,
req: CreateProfileRequest
): Promise<GenericResponse> {
const now = new Date();
const profile: ProfileSpec = {
teamId: 2 as ExtId<Team>, // TODO
name: req.name,
@@ -32,7 +33,7 @@ export async function createProfile(
lastMileageReward: 0,
};
const profileId = await w.profile().create(profile);
const profileId = await w.profile().create(req.aimeId, profile, now);
await w.chara().save(profileId, req.chara);
await w.car().saveCar(profileId, req.car);