Skip to content

Commit

Permalink
Missing await??
Browse files Browse the repository at this point in the history
  • Loading branch information
bhollis committed Sep 6, 2024
1 parent 7ce3761 commit fcc6601
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions api/stately/apps-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export async function insertApp(app: ApiApp): Promise<ApiApp> {
resultApp = convertToApiApp(getResult);
return;
}
txn.put(client.create('ApiApp', app));
await txn.put(client.create('ApiApp', app));
});

if (resultApp) {
Expand All @@ -117,6 +117,10 @@ function keyPathFor(id: string) {
// would cause problems serializing to JSON, since it's a bigint. It'd be nice
// if I could've used a 32-bit int, but that isn't in the standard schema types...
function convertToApiApp(app: StatelyApiApp): ApiApp {
const { partition, ...rest } = app;
return rest;
return {
id: app.id,
bungieApiKey: app.bungieApiKey,
dimApiKey: app.dimApiKey,
origin: app.origin,
};
}

0 comments on commit fcc6601

Please sign in to comment.