fix(server): upload filters answer multer once on a throwing callback; positive call-graph gate test

This commit is contained in:
jubnl
2026-09-22 08:10:23 +02:00
parent ae2af05cad
commit de2d13b1af
5 changed files with 72 additions and 15 deletions
@@ -0,0 +1,23 @@
/**
* Fixture for `db-call-graph.mjs --sync --tx --root scripts/__fixtures__`: one class that
* still touches the database synchronously and opens a raw transaction, so the two gates
* CI runs (`--sync`, `--tx`) each have a known-bad case to report. `unawaited-sample.ts`
* beside it is clean under both flags.
*/
interface RawDb {
get(sql: string, ...args: unknown[]): unknown;
transaction<T>(fn: () => T): T;
}
export class SyncSample {
private db: RawDb = { get: () => undefined, transaction: (fn) => fn() };
readSync(id: number): unknown {
return this.db.get('SELECT 1 WHERE id = ?', id); // sync DB-touching method
}
writeInTx(): void {
this.db.transaction(() => undefined); // raw transaction site
}
}