Skip to content

Commit

Permalink
Merge pull request #2 from Lxxyx/master
Browse files Browse the repository at this point in the history
docs(readme) 修正文档
  • Loading branch information
Foveluy authored Apr 6, 2018
2 parents f1a0275 + c9819d6 commit 6dcc5ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Blueprint(app,{prefix:'/api'})

//controller.ts
export default class index extends Controller {
@bp.route.get('/user') //===>>/api/user
@bp.get('/user') //===>>/api/user
async get() {
this.ctx.body = 'hello,egg-blueprint'
}
Expand All @@ -66,12 +66,12 @@ export default class index extends Controller {
import { bp } from 'egg-blueprint'

export default class index extends Controller {
@bp.route.get('/')
@bp.get('/')
async get() {
this.ctx.body = 'hello,egg-blueprint'
}

@bp.route.post('/')
@bp.post('/')
async post() {
this.ctx.body = 'hello,post,egg-blueprint'
}
Expand Down Expand Up @@ -124,7 +124,7 @@ export default class TestController extends Controller {
```js
import { bp } from 'egg-blueprint'

bp.restfulClass('blueprint')
@bp.restfulClass('blueprint')
export default class Index extends Controller {
async Get() {
this.ctx.body = 'hello,egg-blueprint'
Expand Down

0 comments on commit 6dcc5ee

Please sign in to comment.