66 * Date : Fri 03 Mar 2017 03:22:10 PM CST
77 */
88
9+ 'use strict'
910
1011module . exports = app => {
1112
1213 const prefix = '/api/v2'
1314
14- // @auth , all require auth
15+ // @auth
1516 app . post ( 'v2ex' , `${ prefix } /auth/login` , 'auth.login' )
1617 app . get ( 'v2ex' , `${ prefix } /auth/login` , 'auth.login' ) // for test
1718 app . post ( 'v2ex' , `${ prefix } /auth/login` , 'auth.login' )
@@ -35,13 +36,13 @@ module.exports = app => {
3536 app . get ( 'v2ex' , `${ prefix } /topics/hot` , 'topics.hot' )
3637 app . get ( 'v2ex' , `${ prefix } /topics/:id` , 'topics.show' )
3738 app . get ( 'v2ex' , `${ prefix } /topics/all/:type/:value` , 'topics.getAllByType' )
38- // require auth
39+ // auth required
3940 app . post ( 'v2ex' , `${ prefix } /topics/new` , 'topics.create' )
4041 // app.get('v2ex', `${prefix}/topics/new`, 'topics.create') // for test
4142
4243 // @repies
4344 app . get ( 'v2ex' , `${ prefix } /replies/:topic_id` , 'replies.show' )
44- // require auth
45+ // auth required
4546 app . post ( 'v2ex' , `${ prefix } /replies/:topic_id` , 'replies.create' )
4647 // app.get('v2ex', `${prefix}/replies/:topic_id/new`, 'replies.create') // for test
4748
@@ -79,5 +80,5 @@ module.exports = app => {
7980 // @replies
8081 // http://localhost:7001/replies/344499?page=1&page_size=20 // page_size貌似没用...
8182
82- } // /.router
83+ } // /.router map
8384
0 commit comments