Skip to content

Commit

Permalink
Fix proper formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin1193 committed May 27, 2022
1 parent bfb0da9 commit c41014c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ For TypeScript projects add to `tsconfig.json` file:

## Example

### response.ok()
#### response.ok()
```
public async someFunction({ response, auth }: HttpContextContract) {
return response.ok('Your messaged here.')
}
```
### response.data()
#### response.data()
```
public async someFunction({ response, auth }: HttpContextContract) {
return response.data({
Expand All @@ -55,7 +55,7 @@ public async someFunction({ response, auth }: HttpContextContract) {
}, 'Your messaged here is optional')
}
```
### response.resource()
#### response.resource()
Note: Need to install adonis-bumblebee-ts to be able to use this function for transforming data
```
public async listItems({ response, auth, transform }: HttpContextContract) {
Expand All @@ -66,7 +66,7 @@ public async showItem({ response, auth, transform }: HttpContextContract) {
return response.resource(await transform.item(item, ItemTransformer))
}
```
### response.accepted()
#### response.accepted()
Note: For creating record status code = 201
```
public async store({ response, auth, transform }: HttpContextContract) {
Expand All @@ -78,12 +78,12 @@ public async store({ response, auth, transform }: HttpContextContract) {
```
#### response.error()

### response.unableToProcess()
#### response.unableToProcess()

### response.notFound()
#### response.notFound()

### response.forbidden()
#### response.forbidden()

### response.unauthorized()
#### response.unauthorized()

### response.badRequest()
#### response.badRequest()

0 comments on commit c41014c

Please sign in to comment.