From d6568c53a093aa259291c9573a70d10c9cc06c65 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sat, 14 Jul 2018 19:20:28 -0400 Subject: [PATCH] Fix annotations --- lib/src/commands/make/controller.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/commands/make/controller.dart b/lib/src/commands/make/controller.dart index 1ec1845e..58a1d250 100644 --- a/lib/src/commands/make/controller.dart +++ b/lib/src/commands/make/controller.dart @@ -69,7 +69,7 @@ class ControllerCommand extends Command { ..name = 'hello' ..returns = refer('void') ..annotations.add(refer('ExposeWs') - .newInstance([literal('get_${rc.snakeCase}')])) + .call([literal('get_${rc.snakeCase}')])) ..requiredParameters.add(new Parameter((b) => b ..name = 'socket' ..type = refer('WebSocketContext'))) @@ -83,13 +83,13 @@ class ControllerCommand extends Command { } else { clazz ..annotations - .add(refer('Expose').newInstance([literal('/${rc.snakeCase}')])) + .add(refer('Expose').call([literal('/${rc.snakeCase}')])) ..methods.add(new Method((meth) { meth ..name = 'hello' ..returns = refer('String') ..body = literal('Hello, world').returned.statement - ..annotations.add(refer('Expose').newInstance([ + ..annotations.add(refer('Expose').call([ literal('/'), ])); }));