@@ -4,12 +4,10 @@ import multer from "multer";
44// import { isAuthorizedByRole } from "@/middlewares/auth";
55import { entityRequestDtoValidator } from "@/middlewares/validators/entityValidators" ;
66// import EntityService from "@/services/implementations/entityService";
7+ import entityServiceMock from "@/services/implementations/entityServiceMock" ;
78// import FileStorageService from "@/services/implementations/fileStorageService";
89// import { IFileStorageService } from "@/services/interfaces/IFileStorageService";
9- import {
10- EntityResponseDTO ,
11- IEntityService ,
12- } from "@/services/interfaces/IEntityService" ;
10+ import { EntityResponseDTO } from "@/services/interfaces/IEntityService" ;
1311import { getErrorMessage } from "@/utilities/errorUtils" ;
1412import { sendResponseByMimeType } from "@/utilities/responseUtil" ;
1513
@@ -25,28 +23,7 @@ const defaultBucket = process.env.FIREBASE_STORAGE_DEFAULT_BUCKET || "";
2523// defaultBucket,
2624// );
2725// const entityService: IEntityService = new EntityService(fileStorageService);
28-
29- // Mock Service
30- let memoryStore : Record < string , unknown > = { } ;
31- const entityService : IEntityService = {
32- createEntity : async ( entity ) => {
33- memoryStore = { id : "1" , ...entity } ;
34- return memoryStore ;
35- } ,
36- updateEntity : async ( id , entity ) => {
37- memoryStore = { id, ...entity } ;
38- return memoryStore ;
39- } ,
40- /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
41- getEntity : async ( id ) => {
42- return memoryStore ;
43- } ,
44- getEntities : async ( ) => [ memoryStore ] ,
45- deleteEntity : async ( id ) => {
46- memoryStore = { } ;
47- return id ;
48- } ,
49- } ;
26+ const entityService = entityServiceMock ;
5027
5128/* Create entity */
5229entityRouter . post (
0 commit comments