20 lines
502 B
TypeScript
20 lines
502 B
TypeScript
/**
|
|
* list-all-feedback.use-case.ts
|
|
* Solo accesible por admin. Devuelve TODOS los reportes que han mandado
|
|
* los ciudadanos a través del buzón, ordenados del más reciente al más
|
|
* antiguo.
|
|
*/
|
|
|
|
import type {
|
|
FeedbackItem,
|
|
FeedbackRepository,
|
|
} from "../../repositories/feedback.repository.js";
|
|
|
|
export class ListAllFeedbackUseCase {
|
|
constructor(private readonly repository: FeedbackRepository) {}
|
|
|
|
async execute(): Promise<FeedbackItem[]> {
|
|
return this.repository.listAll();
|
|
}
|
|
}
|