Skip to content

Commit

Permalink
docs: 📝 change order of README content
Browse files Browse the repository at this point in the history
  • Loading branch information
doralteres committed Oct 14, 2023
1 parent d27708f commit 93f0161
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ Thank you for your understanding and patience as we work towards making this CLI
- **Transaction Support:** Create, Update and Delete routes runs inside [sequelize transaction](https://sequelize.org/docs/v6/other-topics/transactions/) to handle pre/post hooks and rollback automatically in case something failed in the process.
- **Secure and Efficient:** Utilizes Sequelize's robust security features and optimized database queries.

## CRUD Routes

| Operation | URL | Sequelize Operation | Comment |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **getList** | Clean:<br>_GET_ `<API_URL>/<BASE_PATH>`<br><br>With pagination:<br>_GET_ `<API_URL>/<BASE_PATH>?_start=30&_end=60`<br><br>With sort & filters:<br>_GET_ `<API_URL>/<BASE_PATH>?_sort=createdAt&_order=DESC&gender=female` | `findAll()`<br>or<br>`findAndCountAll()` | - Enable pagination with `pagination: true` in the config.<br>- Pagination automatically adds `Content-Range` header.<br>- Can control which fields can be filterable using `filterableFields` in the config.<br>- Can control which fields can be sortable using `sortableFieldsFields` in the config. |
| **getOne** | _GET_ `<API_URL>/<BASE_PATH>/:resourceId` | `findByPk()` | |
| **create** | _POST_ `<API_URL>/<BASE_PATH>` | `create()` | - Can control which fields can be added to body request using `creatableFields` in the config. |
| **update** | _PUT_ `<API_URL>/<BASE_PATH>/:resourceId` | `update()` | - Can control which fields can be added to body request using `updatableFields` in the config. |
| **delete** | _DELETE_ `<API_URL>/<BASE_PATH>/:resourceId` | `destroy()` | |

## Installation

Using npm:
Expand Down Expand Up @@ -124,6 +114,16 @@ app.listen(port, () => {

> Check out our [example project](./example) for more features and complex use-cases
## CRUD Routes

| Operation | URL | Sequelize Operation | Comment |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **getList** | Clean:<br>_GET_ `<API_URL>/<BASE_PATH>`<br><br>With pagination:<br>_GET_ `<API_URL>/<BASE_PATH>?_start=30&_end=60`<br><br>With sort & filters:<br>_GET_ `<API_URL>/<BASE_PATH>?_sort=createdAt&_order=DESC&gender=female` | `findAll()`<br>or<br>`findAndCountAll()` | - Enable pagination with `pagination: true` in the config.<br>- Pagination automatically adds `Content-Range` header.<br>- Can control which fields can be filterable using `filterableFields` in the config.<br>- Can control which fields can be sortable using `sortableFieldsFields` in the config. |
| **getOne** | _GET_ `<API_URL>/<BASE_PATH>/:resourceId` | `findByPk()` | |
| **create** | _POST_ `<API_URL>/<BASE_PATH>` | `create()` | - Can control which fields can be added to body request using `creatableFields` in the config. |
| **update** | _PUT_ `<API_URL>/<BASE_PATH>/:resourceId` | `update()` | - Can control which fields can be added to body request using `updatableFields` in the config. |
| **delete** | _DELETE_ `<API_URL>/<BASE_PATH>/:resourceId` | `destroy()` | |

## Documentation

For detailed usage instructions, examples, and customization options, please refer to our [Documentation](./DOCUMENTATION.md).
Expand Down

0 comments on commit 93f0161

Please sign in to comment.