mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 07:33:17 +00:00
Apply async/await on geneated controllers
This commit is contained in:
parent
a50f33c5ff
commit
3f2a81deee
@ -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;
|
||||
// }
|
||||
// }
|
||||
};
|
||||
|
||||
@ -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;
|
||||
// }
|
||||
// }
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user