Closed changrui closed 3 years ago
8 | struct Person {
middleware_example.v:24:6: error: unknown method: nedpals.vex.router.Router.get. 6 possibilities: group, inject, receive, respond_error, route, use. 22 | mut app := router.new() 23 | app.use(do_stuff, print_req_info) 24 | app.get('/', fn (req ctx.Req, mut res ctx.Resp) { | ~~~~~~~~~ 25 | res.send_json(Person{ 26 | name: req.query['name'] middleware_example.v:30:6: error: unknown method: nedpals.vex.router.Router.get. 6 possibilities: group, inject, receive, respond_error, route, use. 28 | }, 200) 29 | }) 30 | app.get('/hello', fn (req ctx.Req, mut res ctx.Resp) { | ~~~~~~~~~~ 31 | res.send('Hello World!', 200) 32 | })
nedpals.vex.router.Router.get
group
inject
receive
respond_error
route
use
Closed. I fixed the middleware example. Thanks for reporting :smile:
middleware_example.v:24:6: error: unknown method:
nedpals.vex.router.Router.get
. 6 possibilities:group
,inject
,receive
,respond_error
,route
,use
. 22 | mut app := router.new() 23 | app.use(do_stuff, print_req_info) 24 | app.get('/', fn (req ctx.Req, mut res ctx.Resp) { |~~~~~~~~~25 | res.send_json(Person{ 26 | name: req.query['name'] middleware_example.v:30:6: error: unknown method:nedpals.vex.router.Router.get
. 6 possibilities:group
,inject
,receive
,respond_error
,route
,use
. 28 | }, 200) 29 | }) 30 | app.get('/hello', fn (req ctx.Req, mut res ctx.Resp) { |~~~~~~~~~~31 | res.send('Hello World!', 200) 32 | })