23 lines
761 B
JavaScript
23 lines
761 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.ListFindingsQuery = void 0;
|
|
const Result_1 = require("../../../../shared/domain/Result");
|
|
class ListFindingsQuery {
|
|
constructor(repository) {
|
|
this.repository = repository;
|
|
}
|
|
async execute(request) {
|
|
const filters = {
|
|
sessionId: request.sessionId,
|
|
severity: request.severity,
|
|
type: request.type,
|
|
status: request.status,
|
|
search: request.search,
|
|
};
|
|
const findings = await this.repository.findAll(filters);
|
|
const total = await this.repository.count(filters);
|
|
return (0, Result_1.Ok)({ findings, total });
|
|
}
|
|
}
|
|
exports.ListFindingsQuery = ListFindingsQuery;
|