@@ -41,14 +41,15 @@ export function RegisterRoutes(app: Router) {
41
41
// NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look
42
42
// Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa
43
43
// ###########################################################################################################
44
+
44
45
app . get (
45
46
"/latest-block" ,
46
47
...fetchMiddlewares < RequestHandler > ( BlockController ) ,
47
48
...fetchMiddlewares < RequestHandler > (
48
49
BlockController . prototype . getLatestBlock ,
49
50
) ,
50
51
51
- function BlockController_getLatestBlock (
52
+ async function BlockController_getLatestBlock (
52
53
request : ExRequest ,
53
54
response : ExResponse ,
54
55
next : any ,
@@ -67,7 +68,7 @@ export function RegisterRoutes(app: Router) {
67
68
68
69
const controller = new BlockController ( ) ;
69
70
70
- templateService . apiHandler ( {
71
+ await templateService . apiHandler ( {
71
72
methodName : "getLatestBlock" ,
72
73
controller,
73
74
response,
@@ -81,14 +82,64 @@ export function RegisterRoutes(app: Router) {
81
82
} ,
82
83
) ;
83
84
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
85
+ app . get (
86
+ "/note-witness" ,
87
+ ...fetchMiddlewares < RequestHandler > ( BlockController ) ,
88
+ ...fetchMiddlewares < RequestHandler > ( BlockController . prototype . noteWitness ) ,
89
+
90
+ async function BlockController_noteWitness (
91
+ request : ExRequest ,
92
+ response : ExResponse ,
93
+ next : any ,
94
+ ) {
95
+ const args : Record < string , TsoaRoute . ParameterSchema > = {
96
+ index : {
97
+ in : "query" ,
98
+ name : "index" ,
99
+ required : true ,
100
+ dataType : "double" ,
101
+ } ,
102
+ confirmations : {
103
+ in : "query" ,
104
+ name : "confirmations" ,
105
+ dataType : "double" ,
106
+ } ,
107
+ } ;
108
+
109
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
110
+
111
+ let validatedArgs : any [ ] = [ ] ;
112
+ try {
113
+ validatedArgs = templateService . getValidatedArgs ( {
114
+ args,
115
+ request,
116
+ response,
117
+ } ) ;
118
+
119
+ const controller = new BlockController ( ) ;
120
+
121
+ await templateService . apiHandler ( {
122
+ methodName : "noteWitness" ,
123
+ controller,
124
+ response,
125
+ next,
126
+ validatedArgs,
127
+ successStatus : undefined ,
128
+ } ) ;
129
+ } catch ( err ) {
130
+ return next ( err ) ;
131
+ }
132
+ } ,
133
+ ) ;
134
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
84
135
app . post (
85
136
"/transaction" ,
86
137
...fetchMiddlewares < RequestHandler > ( BlockController ) ,
87
138
...fetchMiddlewares < RequestHandler > (
88
139
BlockController . prototype . broadcastTransaction ,
89
140
) ,
90
141
91
- function BlockController_broadcastTransaction (
142
+ async function BlockController_broadcastTransaction (
92
143
request : ExRequest ,
93
144
response : ExResponse ,
94
145
next : any ,
@@ -121,7 +172,7 @@ export function RegisterRoutes(app: Router) {
121
172
122
173
const controller = new BlockController ( ) ;
123
174
124
- templateService . apiHandler ( {
175
+ await templateService . apiHandler ( {
125
176
methodName : "broadcastTransaction" ,
126
177
controller,
127
178
response,
@@ -140,7 +191,7 @@ export function RegisterRoutes(app: Router) {
140
191
...fetchMiddlewares < RequestHandler > ( BlockController ) ,
141
192
...fetchMiddlewares < RequestHandler > ( BlockController . prototype . getBlock ) ,
142
193
143
- function BlockController_getBlock (
194
+ async function BlockController_getBlock (
144
195
request : ExRequest ,
145
196
response : ExResponse ,
146
197
next : any ,
@@ -176,7 +227,7 @@ export function RegisterRoutes(app: Router) {
176
227
177
228
const controller = new BlockController ( ) ;
178
229
179
- templateService . apiHandler ( {
230
+ await templateService . apiHandler ( {
180
231
methodName : "getBlock" ,
181
232
controller,
182
233
response,
@@ -197,7 +248,7 @@ export function RegisterRoutes(app: Router) {
197
248
BlockController . prototype . getBlockRange ,
198
249
) ,
199
250
200
- function BlockController_getBlockRange (
251
+ async function BlockController_getBlockRange (
201
252
request : ExRequest ,
202
253
response : ExResponse ,
203
254
next : any ,
@@ -238,7 +289,7 @@ export function RegisterRoutes(app: Router) {
238
289
239
290
const controller = new BlockController ( ) ;
240
291
241
- templateService . apiHandler ( {
292
+ await templateService . apiHandler ( {
242
293
methodName : "getBlockRange" ,
243
294
controller,
244
295
response,
@@ -259,7 +310,7 @@ export function RegisterRoutes(app: Router) {
259
310
BlockController . prototype . getServerInfo ,
260
311
) ,
261
312
262
- function BlockController_getServerInfo (
313
+ async function BlockController_getServerInfo (
263
314
request : ExRequest ,
264
315
response : ExResponse ,
265
316
next : any ,
@@ -278,7 +329,7 @@ export function RegisterRoutes(app: Router) {
278
329
279
330
const controller = new BlockController ( ) ;
280
331
281
- templateService . apiHandler ( {
332
+ await templateService . apiHandler ( {
282
333
methodName : "getServerInfo" ,
283
334
controller,
284
335
response,
0 commit comments