fase(3): crawling module domain and application

This commit is contained in:
debian
2026-03-04 16:32:09 -05:00
parent 4a58749048
commit 39c5313ba5
40 changed files with 1117 additions and 13 deletions

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListSessionsQuery = void 0;
const Result_1 = require("../../../../shared/domain/Result");
class ListSessionsQuery {
constructor(repository) {
this.repository = repository;
}
async execute(_request) {
const sessions = await this.repository.findAll();
const dtos = sessions.map((session) => ({
id: session.id.toString(),
url: session.url,
status: session.status,
seed: session.seed,
maxStates: session.maxStates,
statesVisited: session.statesVisited,
config: session.config,
}));
return (0, Result_1.Ok)(dtos);
}
}
exports.ListSessionsQuery = ListSessionsQuery;