mirror of
				https://github.com/Telecominfraproject/wlan-cloud-owprov.git
				synced 2025-10-31 02:27:52 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			474 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			474 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| //
 | |
| // Created by stephane bourque on 2021-07-10.
 | |
| //
 | |
| 
 | |
| #include "RESTAPI_asset_server.h"
 | |
| #include "Daemon.h"
 | |
| #include "Poco/File.h"
 | |
| #include "framework/ow_constants.h"
 | |
| 
 | |
| namespace OpenWifi {
 | |
| 	void RESTAPI_asset_server::DoGet() {
 | |
| 		Poco::File AssetFile;
 | |
| 
 | |
| 		std::string AssetName = GetBinding(RESTAPI::Protocol::ID, "");
 | |
| 		AssetFile = Daemon()->AssetDir() + "/" + AssetName;
 | |
| 		if (!AssetFile.isFile()) {
 | |
| 			return NotFound();
 | |
| 		}
 | |
| 		SendFile(AssetFile);
 | |
| 	}
 | |
| } // namespace OpenWifi
 | 
