Skip to content

Commit

Permalink
#15 - Updated routes
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikpyt committed Oct 10, 2023
1 parent 29d0085 commit 148fe2e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/modules/item/blob/blob.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import ItemService from '../item.service';
import AccessService from '../sharing/access.service';

export default async (fastify: FastifyInstance) => {
const itemService = new ItemService();
const blobController = new BlobController(
new BlobService(),
new AccessService(new ItemService(), new SharingService()),
new AccessService(itemService, new SharingService(itemService)),
);

fastify.get(
Expand Down
3 changes: 2 additions & 1 deletion src/modules/item/docs/docs.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import ItemService from '../item.service';
import SharingService from '../sharing/sharing.service';

export default async (fastify: FastifyInstance) => {
const itemService = new ItemService();
const docsService = new DocsService();
const docsController = new DocsController(
docsService,
new AccessService(new ItemService(), new SharingService()),
new AccessService(itemService, new SharingService(itemService)),
);

fastify.get(
Expand Down
3 changes: 2 additions & 1 deletion src/modules/item/folder/folder.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import ItemService from '../item.service';
import SharingService from '../sharing/sharing.service';

export default async (fastify: FastifyInstance) => {
const itemService = new ItemService();
const folderService = new FolderService();
const folderController = new FolderController(
folderService,
new AccessService(new ItemService(), new SharingService()),
new AccessService(itemService, new SharingService(itemService)),
);

fastify.get(
Expand Down
2 changes: 1 addition & 1 deletion src/modules/item/item.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default async (fastify: FastifyInstance) => {
const itemService = new ItemService();
const itemController = new ItemController(
itemService,
new AccessService(itemService, new SharingService()),
new AccessService(itemService, new SharingService(itemService)),
);

fastify.get(
Expand Down
3 changes: 2 additions & 1 deletion src/modules/item/shortcut/shortcut.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import ItemService from '../item.service';
import SharingService from '../sharing/sharing.service';

export default async (fastify: FastifyInstance) => {
const itemService = new ItemService();
const shortcutService = new ShortcutService();
const shortcutController = new ShortcutController(
shortcutService,
new AccessService(new ItemService(), new SharingService()),
new AccessService(itemService, new SharingService(itemService)),
);

fastify.get(
Expand Down

0 comments on commit 148fe2e

Please sign in to comment.