mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
				synced 2025-11-04 12:47:46 +00:00 
			
		
		
		
	Refactoring project layout
This commit is contained in:
		
							
								
								
									
										25
									
								
								src/RESTAPI/RESTAPI_systemEndpoints_handler.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								src/RESTAPI/RESTAPI_systemEndpoints_handler.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
//
 | 
			
		||||
// Created by stephane bourque on 2021-07-01.
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
#include "RESTAPI_systemEndpoints_handler.h"
 | 
			
		||||
#include "../Daemon.h"
 | 
			
		||||
#include "RESTAPI_SecurityObjects.h"
 | 
			
		||||
 | 
			
		||||
namespace OpenWifi {
 | 
			
		||||
 | 
			
		||||
    void RESTAPI_systemEndpoints_handler::DoGet() {
 | 
			
		||||
        auto Services = Daemon()->GetServices();
 | 
			
		||||
        SecurityObjects::SystemEndpointList L;
 | 
			
		||||
        for(const auto &i:Services) {
 | 
			
		||||
            SecurityObjects::SystemEndpoint S{
 | 
			
		||||
                .type = i.Type,
 | 
			
		||||
                .id = i.Id,
 | 
			
		||||
                .uri = i.PublicEndPoint};
 | 
			
		||||
            L.endpoints.push_back(S);
 | 
			
		||||
        }
 | 
			
		||||
        Poco::JSON::Object  Obj;
 | 
			
		||||
        L.to_json(Obj);
 | 
			
		||||
        ReturnObject(Obj);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user