Shows/service: rename find function to search
This commit is contained in:
parent
00d57b4feb
commit
66778f9944
1 changed files with 1 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ export class ShowsService {
|
||||||
return this.showModel.findById(id);
|
return this.showModel.findById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
async find(name: string) {
|
async search(name: string) {
|
||||||
const regex = new RegExp(name, 'i');
|
const regex = new RegExp(name, 'i');
|
||||||
return this.showModel.find({ title: { $regex: regex } });
|
return this.showModel.find({ title: { $regex: regex } });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue