Refactor indentation and import statements.

Aligned the indentation to use tabs consistently and updated import statements to use double quotes for consistency throughout the file. These changes improve code readability and maintain uniform style.
This commit is contained in:
Mathis H (Avnyr) 2024-10-07 12:01:13 +02:00
parent 07d65484c3
commit 66ca040807
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -1,29 +1,28 @@
import { Injectable } from '@nestjs/common';
import { DbService } from 'apps/backend/src/app/db/db.service';
import { FilesGroupTable } from 'apps/backend/src/app/db/schema';
import { ilike } from 'drizzle-orm';
import { Injectable } from "@nestjs/common";
import { DbService } from "apps/backend/src/app/db/db.service";
import { FilesGroupTable } from "apps/backend/src/app/db/schema";
import { ilike } from "drizzle-orm";
@Injectable()
export class GroupsService {
constructor(private readonly database: DbService) {}
constructor(private readonly database: DbService) {}
//TODO a method to fetch groups in the database by a specific search with limit, offset and a search field (can be blank)
async getGroupsByName(limit: number, offset: number, search: string) {
return await this.database.use()
.select()
.from(FilesGroupTable)
.where(ilike(FilesGroupTable.groupName, search))
.limit(limit)
.offset(offset)
.prepare("getGroupsByName")
.execute();
}
//TODO a method to fetch groups in the database by a specific search with limit, offset and a search field (can be blank)
async getGroupsByName(limit: number, offset: number, search: string) {
return await this.database
.use()
.select()
.from(FilesGroupTable)
.where(ilike(FilesGroupTable.groupName, search))
.limit(limit)
.offset(offset)
.prepare("getGroupsByName")
.execute();
}
//TODO The method to create a group
//TODO The method to create a group
//TODO a method to delete a group and place the associated file at a null group reference
//TODO a method to delete a group and place the associated file at a null group reference
//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)
//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)
}