fase(7): api server refactor with composition root
This commit is contained in:
21
dist/modules/fuzzing/infrastructure/repositories/InMemoryFuzzSessionRepository.js
vendored
Normal file
21
dist/modules/fuzzing/infrastructure/repositories/InMemoryFuzzSessionRepository.js
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.InMemoryFuzzSessionRepository = void 0;
|
||||
/**
|
||||
* InMemoryFuzzSessionRepository — temporary in-memory store used until Phase 8 adds SQLite persistence.
|
||||
*/
|
||||
class InMemoryFuzzSessionRepository {
|
||||
constructor() {
|
||||
this.store = new Map();
|
||||
}
|
||||
async save(session) {
|
||||
this.store.set(session.id.toString(), session);
|
||||
}
|
||||
async findById(id) {
|
||||
return this.store.get(id) ?? null;
|
||||
}
|
||||
async update(session) {
|
||||
this.store.set(session.id.toString(), session);
|
||||
}
|
||||
}
|
||||
exports.InMemoryFuzzSessionRepository = InMemoryFuzzSessionRepository;
|
||||
Reference in New Issue
Block a user