refactor: compose investigation record ownership (#845)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import type { BinarySessionPort } from "../application/BinarySession.js";
|
||||
import type { EvidenceWriter } from "../application/investigation/InvestigationRecordPort.js";
|
||||
import { EvidenceIntegrityError } from "../domain/evidenceErrors.js";
|
||||
import type { Evidence } from "../domain/evidence.js";
|
||||
import { ok, type Result } from "../domain/result.js";
|
||||
|
||||
/** Record source evidence in order, stopping at the first session rejection. */
|
||||
export const recordSessionEvidenceSources = (
|
||||
recordEvidence: BinarySessionPort["recordEvidence"] | undefined,
|
||||
recordEvidence: EvidenceWriter["recordEvidence"] | undefined,
|
||||
sources: readonly Evidence[],
|
||||
): Result<null, EvidenceIntegrityError> => {
|
||||
for (const source of sources) {
|
||||
|
||||
Reference in New Issue
Block a user