Skip to content

Commit dd5083d

Browse files
committed
Remove unused file and rename file and variable for better understanding
1 parent 96d2eea commit dd5083d

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

src/_lib/di/toContainerFunctions.ts renamed to src/_lib/di/containerAdapters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ type Values = Record<string, any>;
66
type ContainerValues = <Type extends Values>(values: Type) => { [key in keyof Type]: Resolver<Type[key]> };
77

88
const toContainerValues: ContainerValues = (values) =>
9-
Object.entries(values).reduce((acc: any, [key, collection]) => ({ ...acc, [key]: asValue(collection) }), {});
9+
Object.entries(values).reduce((acc: any, [key, value]) => ({ ...acc, [key]: asValue(value) }), {});
1010

1111
export { toContainerValues };

src/_lib/di/toContainerValues.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/article/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { makeMongoArticleRepository } from "@/article/infrastructure/MongoArticl
88
import { makeArticleController } from "@/article/interface/http/articleController";
99
import { FindArticles } from "@/article/query/FindArticles";
1010
import { withMongoProvider } from "@/_lib/MongoProvider";
11-
import { toContainerValues } from "@/_lib/di/toContainerFunctions";
11+
import { toContainerValues } from "@/_lib/di/containerAdapters";
1212
import { makeMongoFindArticles } from "@/article/query/impl/MongoFindArticles";
1313
import { makeModule } from "@/context";
1414
import { makeArticleCreatedEmailListener } from "@/article/interface/email/ArticleCreatedEmailListener";

src/comment/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { makeMongoCommentRepository } from "@/comment/infrastructure/MongoCommen
55
import { makeCommentController } from "@/comment/interface/http/commentController";
66
import { makeModule } from "@/context";
77
import { withMongoProvider } from "@/_lib/MongoProvider";
8-
import { toContainerValues } from "@/_lib/di/toContainerFunctions";
8+
import { toContainerValues } from "@/_lib/di/containerAdapters";
99
import { asFunction } from "awilix";
1010

1111
const commentModule = makeModule("comment", async ({ container: { register, build } }) => {

0 commit comments

Comments
 (0)