mirror of
https://github.com/hexastack/hexabot
synced 2025-02-24 05:14:47 +00:00
fix: findOne implementation
This commit is contained in:
parent
52ecbe60d3
commit
de459fcbac
@ -234,10 +234,8 @@ export abstract class BaseRepository<
|
||||
// @TODO : Issue a warning ?
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
const query =
|
||||
typeof criteria === 'string'
|
||||
? this.model.findById<T>(criteria)
|
||||
: this.model.findOne<T>(criteria);
|
||||
|
||||
const query = this.findOneQuery(criteria);
|
||||
return await this.executeOne(query, this.cls, options);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user