Skip to content

Commit e813697

Browse files
author
KoLiBer
committed
docs: change README
1 parent e3d4bb9 commit e813697

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

README.md

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# loopback-component-filter
22

3-
[![Build Status](https://travis-ci.com/loopback4/loopback-component-filter.svg?branch=master)](https://travis-ci.com/loopback4/loopback-component-filter)
3+
![Travis (.org) branch](https://img.shields.io/travis/loopback4/loopback-component-filter/master)
4+
![npm](https://img.shields.io/npm/v/loopback-component-filter)
5+
![npm bundle size](https://img.shields.io/bundlephobia/min/loopback-component-filter)
6+
![GitHub](https://img.shields.io/github/license/loopback4/loopback-component-filter)
47

58
Using this simple extension you can filter models in repository level.
69

@@ -41,19 +44,14 @@ import { FilterRepositoryMixin } from "loopback-component-filter";
4144

4245
export class UserRepository extends FilterRepositoryMixin<
4346
User,
44-
string,
47+
typeof User.prototype.id,
4548
UserRelations
4649
>({
47-
id: "id",
48-
where: async (
49-
context,
50-
where
51-
) => where;
52-
fields: async (
53-
context,
54-
fields
55-
) => fields;
56-
})() {
50+
where: async (context, where) => where,
51+
fields: async (context, fields) => fields,
52+
})<Constructor<DefaultCrudRepository<User, string, UserRelations>>>(
53+
DefaultCrudRepository
54+
) {
5755
// ...
5856
}
5957
```
@@ -66,5 +64,5 @@ export class UserRepository extends FilterRepositoryMixin<
6664

6765
## License
6866

69-
This project is licensed under the [MIT license](LICENSE).
67+
This project is licensed under the [MIT license](LICENSE.md).
7068
Copyright (c) KoLiBer ([email protected])

0 commit comments

Comments
 (0)