mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
refactor(api): simplify services logic
This commit is contained in:
@@ -33,8 +33,8 @@ export abstract class BaseService<
|
||||
return await this.repository.findOne(criteria, options);
|
||||
}
|
||||
|
||||
async findOneAndPopulate(id: string) {
|
||||
return await this.repository.findOneAndPopulate(id);
|
||||
async findOneAndPopulate(criteria: string | TFilterQuery<T>) {
|
||||
return await this.repository.findOneAndPopulate(criteria);
|
||||
}
|
||||
|
||||
async find(filter: TFilterQuery<T>, sort?: QuerySortDto<T>): Promise<T[]> {
|
||||
|
||||
Reference in New Issue
Block a user