mirror of
				https://git.sfja.dk/Mikkel/slige.git
				synced 2025-11-04 13:18:18 +00:00 
			
		
		
		
	return correct responses from sliger rpc
This commit is contained in:
		
							parent
							
								
									105a4eed8b
								
							
						
					
					
						commit
						4a0e23c193
					
				@ -15,7 +15,8 @@ auto sliger::rpc::action::FlameGraph::perform_action(
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    auto json = vm.flame_graph_json();
 | 
					    auto json = vm.flame_graph_json();
 | 
				
			||||||
    if (json) {
 | 
					    if (json) {
 | 
				
			||||||
        writer->write(json.value());
 | 
					        writer->write(
 | 
				
			||||||
 | 
					            std::format("{{ ok: true, flameGraph: \"{}\"  }}", json.value()));
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        writer->write("null");
 | 
					        writer->write("null");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -28,9 +29,10 @@ auto sliger::rpc::action::CodeCoverage::perform_action(
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    auto json = vm.code_coverage_json();
 | 
					    auto json = vm.code_coverage_json();
 | 
				
			||||||
    if (json) {
 | 
					    if (json) {
 | 
				
			||||||
        writer->write(json.value());
 | 
					        writer->write(
 | 
				
			||||||
 | 
					            std::format("{{ ok: true, codeCoverage: \"{}\"  }}", json.value()));
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        writer->write("null");
 | 
					        writer->write("{ ok: false }");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    writer->flush();
 | 
					    writer->flush();
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user