File tree Expand file tree Collapse file tree 5 files changed +18
-19
lines changed Expand file tree Collapse file tree 5 files changed +18
-19
lines changed Original file line number Diff line number Diff line change @@ -100,12 +100,11 @@ export async function startApiServer(datastore: DataStore): Promise<ApiServer> {
100
100
) ;
101
101
102
102
// Validation middleware for Rosetta API
103
- app . use ( '/rosetta/v1' , async ( req , res , next ) => {
103
+ app . use ( '/rosetta/v1' , ( req , res , next ) => {
104
104
// await validateRequest(req.originalUrl, req.body);
105
105
next ( ) ;
106
106
} ) ;
107
107
108
-
109
108
// Setup error handler (must be added at the end of the middleware stack)
110
109
app . use ( ( ( error , req , res , next ) => {
111
110
if ( error && ! res . headersSent ) {
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ export function createRAccountRouter(db: DataStore): RouterWithAsync {
6
6
const router = addAsync ( express . Router ( ) ) ;
7
7
router . use ( express . json ( ) ) ;
8
8
9
- router . postAsync ( '/balance' , async ( req , res ) => {
10
- res . json ( { status : 'ready' } ) ;
9
+ router . post ( '/balance' , ( req , res ) => {
10
+ res . json ( { status : 'ready' } ) ;
11
11
} ) ;
12
12
13
13
return router ;
14
- } ;
14
+ }
Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ import { DataStore } from '../../../datastore/common';
5
5
export function createRBlockRouter ( db : DataStore ) : RouterWithAsync {
6
6
const router = addAsync ( express . Router ( ) ) ;
7
7
8
- router . postAsync ( '/' , async ( req , res ) => {
9
- res . json ( { status : 'ready' } ) ;
8
+ router . post ( '/' , ( req , res ) => {
9
+ res . json ( { status : 'ready' } ) ;
10
10
} ) ;
11
11
12
- router . postAsync ( '/transaction' , async ( req , res ) => {
13
- res . json ( { status : 'ready' } ) ;
12
+ router . post ( '/transaction' , ( req , res ) => {
13
+ res . json ( { status : 'ready' } ) ;
14
14
} ) ;
15
15
16
16
return router ;
17
- } ;
17
+ }
Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ import { DataStore } from '../../../datastore/common';
5
5
export function createRMempoolRouter ( db : DataStore ) : RouterWithAsync {
6
6
const router = addAsync ( express . Router ( ) ) ;
7
7
8
- router . postAsync ( '/' , async ( req , res ) => {
9
- res . json ( { status : 'ready' } ) ;
8
+ router . post ( '/' , ( req , res ) => {
9
+ res . json ( { status : 'ready' } ) ;
10
10
} ) ;
11
11
12
- router . postAsync ( '/transaction' , async ( req , res ) => {
13
- res . json ( { status : 'ready' } ) ;
12
+ router . post ( '/transaction' , ( req , res ) => {
13
+ res . json ( { status : 'ready' } ) ;
14
14
} ) ;
15
15
16
16
return router ;
17
- } ;
17
+ }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
11
11
export function createRNetworkRouter ( db : DataStore ) : RouterWithAsync {
12
12
const router = addAsync ( express . Router ( ) ) ;
13
13
14
- router . postAsync ( '/list' , async ( _req , res ) => {
14
+ router . post ( '/list' , ( _req , res ) => {
15
15
const response = {
16
16
network_identifiers : [
17
17
{
@@ -24,11 +24,11 @@ export function createRNetworkRouter(db: DataStore): RouterWithAsync {
24
24
res . json ( response ) ;
25
25
} ) ;
26
26
27
- router . postAsync ( '/status' , async ( req , res ) => {
28
- res . json ( { status : 'ready' } ) ;
27
+ router . post ( '/status' , ( req , res ) => {
28
+ res . json ( { status : 'ready' } ) ;
29
29
} ) ;
30
30
31
- router . postAsync ( '/options' , async ( _req , res ) => {
31
+ router . post ( '/options' , ( _req , res ) => {
32
32
const response = {
33
33
version : {
34
34
rosetta_version : RosettaConstants . rosettaVersion ,
You can’t perform that action at this time.
0 commit comments