From 2f8d7c95f7dac2cf2e76ff0b3328c345bcc3452e Mon Sep 17 00:00:00 2001 From: czewail Date: Wed, 18 Sep 2019 17:35:25 +0800 Subject: [PATCH] update: controller --- src/app/controller/hello.js | 8 ++++---- src/config/app.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/controller/hello.js b/src/app/controller/hello.js index a1fe2d55..e5fce73f 100644 --- a/src/app/controller/hello.js +++ b/src/app/controller/hello.js @@ -1,13 +1,13 @@ const { - Controller, Http, + Route, Http, Controller, } = require('@dazejs/framework'); -@Controller() -class Hello { +@Route() +class Hello extends Controller { @Http.Get() index() { - return this.ren11der('hello', { + return this.render('hello', { name: 'Daze.js', }); } diff --git a/src/config/app.js b/src/config/app.js index a813c376..68938831 100644 --- a/src/config/app.js +++ b/src/config/app.js @@ -66,6 +66,6 @@ module.exports = { }, providers: [ - // require.resolve('../provider/bootstrap'), + require.resolve('../provider/bootstrap'), ], };