Apply async/await on geneated controllers

This commit is contained in:
Aurélien Georget 2016-11-28 11:36:20 +01:00
parent a50f33c5ff
commit 3f2a81deee
2 changed files with 6 additions and 6 deletions

View File

@ -5,11 +5,11 @@
*/
module.exports = {
// exampleAction: function * () {
// exampleAction: async (ctx, next) {
// try {
// this.body = 'ok';
// ctx.body = 'ok';
// } catch (err) {
// this.body = err;
// ctx.body = err;
// }
// }
};

View File

@ -5,11 +5,11 @@
*/
module.exports = {
// exampleAction: function * () {
// exampleAction: async (ctx, next) {
// try {
// this.body = 'ok';
// ctx.body = 'ok';
// } catch (err) {
// this.body = err;
// ctx.body = err;
// }
// }
};