All files / example/controllers/page welcome.js

100% Statements 5/5
100% Branches 0/0
100% Functions 1/1
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16    1x         1x 1x 1x         1x  
'use strict';
 
const Lark = require('../../..');
 
class Welcome extends Lark.Controller {
 
    async main(ctx) {
        const user = new this.model.data.User(ctx.query.name);
        const info = await user.getInfo(ctx);
        ctx.body = await this.view.render('welcome.tpl', info);
    }
 
}
 
exports.get = Welcome;