File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
template/app/controllers/web Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ async function list(ctx) {
1717
1818 const pageCount = Math . ceil ( itemCount / ctx . query . limit ) ;
1919
20- await ctx . render ( 'admin/users' , {
20+ return ctx . render ( 'admin/users' , {
2121 users,
2222 pageCount,
2323 itemCount,
@@ -28,7 +28,7 @@ async function list(ctx) {
2828async function retrieve ( ctx ) {
2929 ctx . state . result = await Users . findById ( ctx . params . id ) ;
3030 if ( ! ctx . state . result ) throw ctx . translateError ( 'INVALID_USER' ) ;
31- await ctx . render ( 'admin/users/retrieve' ) ;
31+ return ctx . render ( 'admin/users/retrieve' ) ;
3232}
3333
3434async function update ( ctx ) {
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ async function registerOrLogin(ctx) {
8686 ctx . state . verb =
8787 ctx . pathWithoutLocale === '/register' ? 'sign up' : 'sign in' ;
8888
89- await ctx . render ( 'register-or-login' ) ;
89+ return ctx . render ( 'register-or-login' ) ;
9090}
9191
9292async function homeOrDashboard ( ctx ) {
@@ -104,7 +104,8 @@ async function homeOrDashboard(ctx) {
104104 ) ,
105105 description : sanitize ( ctx . request . t ( config . pkg . description ) )
106106 } ;
107- await ctx . render ( 'home' ) ;
107+
108+ return ctx . render ( 'home' ) ;
108109}
109110
110111async function login ( ctx , next ) {
Original file line number Diff line number Diff line change 11async function keys ( ctx ) {
22 // this is like a migration, it will automatically add token + keys if needed
33 await ctx . state . user . save ( ) ;
4- await ctx . render ( 'otp/setup' ) ;
4+ return ctx . render ( 'otp/setup' ) ;
55}
66
77module . exports = keys ;
You can’t perform that action at this time.
0 commit comments