mirror of
https://github.com/djhackersdev/minime.git
synced 2026-04-19 07:47:32 -05:00
wip fix profile create id propagation
This commit is contained in:
parent
1f257cccc4
commit
dc06a9652f
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,6 @@ export async function createProfile(
|
|||
|
||||
return {
|
||||
type: "generic_res",
|
||||
status: 1,
|
||||
status: profileId, // "Generic response" my fucking *ass*
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user