Fix annotations
This commit is contained in:
parent
d7038c7c68
commit
d6568c53a0
1 changed files with 3 additions and 3 deletions
|
@ -69,7 +69,7 @@ class ControllerCommand extends Command {
|
||||||
..name = 'hello'
|
..name = 'hello'
|
||||||
..returns = refer('void')
|
..returns = refer('void')
|
||||||
..annotations.add(refer('ExposeWs')
|
..annotations.add(refer('ExposeWs')
|
||||||
.newInstance([literal('get_${rc.snakeCase}')]))
|
.call([literal('get_${rc.snakeCase}')]))
|
||||||
..requiredParameters.add(new Parameter((b) => b
|
..requiredParameters.add(new Parameter((b) => b
|
||||||
..name = 'socket'
|
..name = 'socket'
|
||||||
..type = refer('WebSocketContext')))
|
..type = refer('WebSocketContext')))
|
||||||
|
@ -83,13 +83,13 @@ class ControllerCommand extends Command {
|
||||||
} else {
|
} else {
|
||||||
clazz
|
clazz
|
||||||
..annotations
|
..annotations
|
||||||
.add(refer('Expose').newInstance([literal('/${rc.snakeCase}')]))
|
.add(refer('Expose').call([literal('/${rc.snakeCase}')]))
|
||||||
..methods.add(new Method((meth) {
|
..methods.add(new Method((meth) {
|
||||||
meth
|
meth
|
||||||
..name = 'hello'
|
..name = 'hello'
|
||||||
..returns = refer('String')
|
..returns = refer('String')
|
||||||
..body = literal('Hello, world').returned.statement
|
..body = literal('Hello, world').returned.statement
|
||||||
..annotations.add(refer('Expose').newInstance([
|
..annotations.add(refer('Expose').call([
|
||||||
literal('/'),
|
literal('/'),
|
||||||
]));
|
]));
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue