From ad098f094bd70dd470a3b0a67cc2604538d40ca7 Mon Sep 17 00:00:00 2001
From: "thibault.capt" <thibault.capt@etu.hesge.ch>
Date: Sun, 23 Feb 2025 14:36:12 +0100
Subject: [PATCH] (feat): change config for using http

---
 todo-workspace/frontend/src/app/app.config.ts | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/todo-workspace/frontend/src/app/app.config.ts b/todo-workspace/frontend/src/app/app.config.ts
index 44e7ba1..5e3071c 100644
--- a/todo-workspace/frontend/src/app/app.config.ts
+++ b/todo-workspace/frontend/src/app/app.config.ts
@@ -4,7 +4,7 @@ import { provideRouter } from '@angular/router';
 import { routes } from './app.routes';
 import { provideHttpClient } from '@angular/common/http';
 import { TodoService } from '@core/ports/todo.service';
-import { InMemoryTodoService } from '@core/adapters/in-memory-todo.service';
+import { HttpTodoService } from '@core/adapters/http-todo.service';
 
 export const appConfig: ApplicationConfig = {
   providers: [
@@ -14,17 +14,7 @@ export const appConfig: ApplicationConfig = {
 
     {
       provide: TodoService,
-      useFactory: () => new InMemoryTodoService(),
+      useFactory: () => new HttpTodoService(),
     },
-
-    /*{
-      provide: TodoService,
-      useFactory: () =>
-        new InMemoryTodoService().withTodos([
-          new TodoBuilder().withId(1).withName('Apprendre Angular 19').uncomplete().build(),
-          new TodoBuilder().withId(2).withName('Apprendre Java Spring Boot').complete().build(),
-          new TodoBuilder().withId(3).withName('Apprendre PostgreSQL').uncomplete().build(),
-        ]),
-    },*/
   ],
 };
-- 
GitLab