blog/frontend/src/lib/post/application/useCase/getAllPostsUseCase.ts
2025-07-23 19:33:39 +08:00

11 lines
336 B
TypeScript

import type { PostRepository } from '$lib/post/application/repository/postRepository';
import type { PostInfo } from '$lib/post/domain/entity/postInfo';
export class GetAllPostUseCase {
constructor(private readonly postRepository: PostRepository) {}
execute(): Promise<PostInfo[]> {
return this.postRepository.getAllPosts();
}
}