Skip to content

Commit 32d988b

Browse files
author
sky
committed
1 parent 063fc0d commit 32d988b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/controller/admin.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ export default class AdminController extends Controller {
1010
}
1111

1212
public async home(ctx: Context) {
13-
await ctx.render('admin/home.js', { url: ctx.url.replace(/\/admin/, '') });
13+
if (ctx.query.mode === 'csr') {
14+
await ctx.renderClient('admin/home.js', { url: ctx.url.replace(/\/admin/, '') }, { viewEngine: null });
15+
} else {
16+
await ctx.render('admin/home.js', { url: ctx.url.replace(/\/admin/, '') });
17+
}
1418
}
1519

1620
public async list(ctx: Context) {

0 commit comments

Comments
 (0)