Add retrieval method for all file types in files service
Implemented the `getAllFilesTypes` method to retrieve all file types from the database. This method uses the database connection to select and return an array of file types, completing the previously marked TODO item.
This commit is contained in:
parent
a5f54e165b
commit
6bb9510356
@ -280,8 +280,17 @@ export class FilesService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves all file types from the database.
|
||||||
|
*
|
||||||
|
* @return {Promise<Array>} Promise that resolves to an array of file types.
|
||||||
|
*/
|
||||||
public async getAllFilesTypes() {
|
public async getAllFilesTypes() {
|
||||||
//TODO
|
return await this.database.use()
|
||||||
|
.select()
|
||||||
|
.from(FilesTypesTable)
|
||||||
|
.prepare("getAllFilesTypes")
|
||||||
|
.execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
public async removeFileType() {
|
public async removeFileType() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user