From e03d16bdb4b6fa274f599bd0954504f03617085b Mon Sep 17 00:00:00 2001 From: Mathis Date: Thu, 3 Oct 2024 12:08:47 +0200 Subject: [PATCH] Add constructor to MachinesService with DbService injection. This change introduces a constructor to the MachinesService class, ensuring the DbService is properly injected. This setup prepares for future methods dealing with machine data operations, such as fetching, creating, and deleting machines, as well as retrieving associated files. --- apps/backend/src/app/machines/machines.service.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/backend/src/app/machines/machines.service.ts b/apps/backend/src/app/machines/machines.service.ts index 93d52c6..4854335 100644 --- a/apps/backend/src/app/machines/machines.service.ts +++ b/apps/backend/src/app/machines/machines.service.ts @@ -1,4 +1,15 @@ import { Injectable } from "@nestjs/common"; +import { DbService } from 'apps/backend/src/app/db/db.service'; @Injectable() -export class MachinesService {} +export class MachinesService { + constructor(private readonly database: DbService) {} + + //TODO a method to fetch machines in the database by a specific search with limit, offset and a search field (can be blank) + + //TODO The method to create a machine + + //TODO a method to delete a machine and delete the associated FilesTypeForMachine row + + //TODO a method to get the files of a group in the database by a specific search with limit, offset and a search field (can be blank) +}