Files
djhackersdev_minime/src/idz/handler/saveSettings.ts
T
Tau c2b0bcabc4 idz: Remove profile ext id
Turns out (while researching team creation) the profile ext id
is just the aime id. After creating a team a profile discovery
request is immediately issued with the "profile id" in the field
that holds the aime id during initial profile load.
2019-11-06 17:28:30 -05:00

15 lines
417 B
TypeScript

import { SaveSettingsRequest } from "../request/saveSettings";
import { GenericResponse } from "../response/generic";
import { Repositories } from "../repo";
export async function saveSettings(
w: Repositories,
req: SaveSettingsRequest
): Promise<GenericResponse> {
const profileId = await w.profile().find(req.aimeId);
await w.settings().save(profileId, req.settings);
return { type: "generic_res" };
}