sector => clean archi et test vert

This commit is contained in:
styve Lioumba
2025-10-24 19:25:23 +02:00
parent 3654709250
commit b6241ff911
38 changed files with 453 additions and 313 deletions

View File

@@ -35,10 +35,7 @@ export class ProjectFacade {
private readonly projectPresenter = new ProjectPresenter();
load(userId: string) {
this.loading.set({
action: ActionType.READ,
isLoading: true,
});
this.handleError(ActionType.READ, false, null, true);
this.listUseCase.execute(userId).subscribe({
next: (projects: Project[]) => {
@@ -53,10 +50,7 @@ export class ProjectFacade {
}
loadOne(projectId: string) {
this.loading.set({
action: ActionType.READ,
isLoading: true,
});
this.handleError(ActionType.READ, false, null, true);
this.getUseCase.execute(projectId).subscribe({
next: (project: Project) => {
@@ -70,10 +64,7 @@ export class ProjectFacade {
}
create(projectDto: CreateProjectDto) {
this.loading.set({
action: ActionType.CREATE,
isLoading: true,
});
this.handleError(ActionType.CREATE, false, null, true);
this.createUseCase.execute(projectDto).subscribe({
next: (project: Project) => {
@@ -88,10 +79,7 @@ export class ProjectFacade {
}
update(userId: string, data: any) {
this.loading.set({
action: ActionType.UPDATE,
isLoading: true,
});
this.handleError(ActionType.UPDATE, false, null, true);
this.UpdateUseCase.execute(userId, data).subscribe({
next: (project: Project) => {