File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
aggregation_mode/gateway/src Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ impl GatewayServer {
5353 HttpServer :: new ( move || {
5454 App :: new ( )
5555 . app_data ( Data :: new ( state. clone ( ) ) )
56+ . route ( "/" , web:: get ( ) . to ( Self :: get_root) )
5657 . route ( "/nonce/{address}" , web:: get ( ) . to ( Self :: get_nonce) )
5758 . route ( "/receipts" , web:: get ( ) . to ( Self :: get_receipts) )
5859 . route ( "/proof/sp1" , web:: post ( ) . to ( Self :: post_proof_sp1) )
@@ -66,6 +67,11 @@ impl GatewayServer {
6667 . expect ( "Server to never end" ) ;
6768 }
6869
70+ // Returns an OK response (code 200), no matters what receives in the request
71+ async fn get_root ( _req : HttpRequest ) -> impl Responder {
72+ HttpResponse :: Ok ( ) . json ( AppResponse :: new_sucessfull ( serde_json:: json!( { } ) ) )
73+ }
74+
6975 // Returns the nonce (number of submitted tasks) for a given address
7076 async fn get_nonce ( req : HttpRequest ) -> impl Responder {
7177 let Some ( address_raw) = req. match_info ( ) . get ( "address" ) else {
You can’t perform that action at this time.
0 commit comments