sector => clean archi et test vert
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user