wip fix profile create id propagation

This commit is contained in:
Tau 2019-04-29 15:52:31 -04:00
parent 1f257cccc4
commit dc06a9652f
4 changed files with 9 additions and 9 deletions

View File

@ -24,10 +24,10 @@ export default async function aimedb(socket: Socket) {
}
}
txn.commit();
await txn.commit();
} catch (e) {
console.log("Aimedb: Connection error:\n", e);
txn.rollback();
await txn.rollback();
}
console.log("Aimedb: Connection closed\n");

View File

@ -40,9 +40,9 @@ export class SqlProfileRepository implements ProfileRepository {
if (row === undefined) {
return undefined;
} else {
return _extractRow(row);
}
return _extractRow(row);
}
async discoverByAimeId(aimeId: AimeId): Promise<boolean> {
@ -63,8 +63,8 @@ export class SqlProfileRepository implements ProfileRepository {
async load(extId: ExtId<Profile>): Promise<Profile> {
const loadSql = sql
.select()
.from("idz.profile")
.select("p.*")
.from("idz.profile p")
.where("ext_id", extId)
.toParams();

View File

@ -46,6 +46,6 @@ export async function createProfile(
return {
type: "generic_res",
status: 1,
status: profileId, // "Generic response" my fucking *ass*
};
}

View File

@ -15,10 +15,10 @@ export default async function idz(socket: Socket) {
output.write(await dispatch(txn, req));
}
txn.commit();
await txn.commit();
} catch (e) {
console.log("Idz: Error:", e);
txn.rollback();
await txn.rollback();
}
console.log("Idz: Connection closed\n");