Only show open_registrations: false when restricted mode is enabled
This commit is contained in:
		
							parent
							
								
									5488acb59d
								
							
						
					
					
						commit
						662620be46
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -44,6 +44,8 @@ pub(crate) async fn route(
 | 
				
			||||||
        .map(|s| s.to_owned())
 | 
					        .map(|s| s.to_owned())
 | 
				
			||||||
        .collect();
 | 
					        .collect();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    let open_registrations = !config.restricted_mode();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    web::Json(NodeInfo {
 | 
					    web::Json(NodeInfo {
 | 
				
			||||||
        version: NodeInfoVersion,
 | 
					        version: NodeInfoVersion,
 | 
				
			||||||
        software: Software {
 | 
					        software: Software {
 | 
				
			||||||
| 
						 | 
					@ -55,7 +57,7 @@ pub(crate) async fn route(
 | 
				
			||||||
            inbound: vec![],
 | 
					            inbound: vec![],
 | 
				
			||||||
            outbound: vec![],
 | 
					            outbound: vec![],
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        open_registrations: false,
 | 
					        open_registrations,
 | 
				
			||||||
        usage: Usage {
 | 
					        usage: Usage {
 | 
				
			||||||
            users: Users {
 | 
					            users: Users {
 | 
				
			||||||
                total: 1,
 | 
					                total: 1,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue