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:
parent
07d65484c3
commit
66ca040807
@ -1,29 +1,28 @@
|
|||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from "@nestjs/common";
|
||||||
import { DbService } from 'apps/backend/src/app/db/db.service';
|
import { DbService } from "apps/backend/src/app/db/db.service";
|
||||||
import { FilesGroupTable } from 'apps/backend/src/app/db/schema';
|
import { FilesGroupTable } from "apps/backend/src/app/db/schema";
|
||||||
import { ilike } from 'drizzle-orm';
|
import { ilike } from "drizzle-orm";
|
||||||
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class GroupsService {
|
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)
|
//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) {
|
async getGroupsByName(limit: number, offset: number, search: string) {
|
||||||
return await this.database.use()
|
return await this.database
|
||||||
.select()
|
.use()
|
||||||
.from(FilesGroupTable)
|
.select()
|
||||||
.where(ilike(FilesGroupTable.groupName, search))
|
.from(FilesGroupTable)
|
||||||
.limit(limit)
|
.where(ilike(FilesGroupTable.groupName, search))
|
||||||
.offset(offset)
|
.limit(limit)
|
||||||
.prepare("getGroupsByName")
|
.offset(offset)
|
||||||
.execute();
|
.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)
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user