mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	web_backend: Specify api-version on JSON post.
This commit is contained in:
		
							parent
							
								
									33b012e86b
								
							
						
					
					
						commit
						28c3575679
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -9,6 +9,7 @@ | ||||||
| 
 | 
 | ||||||
| namespace WebService { | namespace WebService { | ||||||
| 
 | 
 | ||||||
|  | static constexpr char API_VERSION[]{"1"}; | ||||||
| static constexpr char ENV_VAR_USERNAME[]{"CITRA_WEB_SERVICES_USERNAME"}; | static constexpr char ENV_VAR_USERNAME[]{"CITRA_WEB_SERVICES_USERNAME"}; | ||||||
| static constexpr char ENV_VAR_TOKEN[]{"CITRA_WEB_SERVICES_TOKEN"}; | static constexpr char ENV_VAR_TOKEN[]{"CITRA_WEB_SERVICES_TOKEN"}; | ||||||
| 
 | 
 | ||||||
|  | @ -44,7 +45,8 @@ void PostJson(const std::string& url, const std::string& data) { | ||||||
| 
 | 
 | ||||||
|     cpr::PostAsync(cpr::Url{url}, cpr::Body{data}, cpr::Header{{"Content-Type", "application/json"}, |     cpr::PostAsync(cpr::Url{url}, cpr::Body{data}, cpr::Header{{"Content-Type", "application/json"}, | ||||||
|                                                                {"x-username", GetUsername()}, |                                                                {"x-username", GetUsername()}, | ||||||
|                                                                {"x-token", GetToken()}}); |                                                                {"x-token", GetToken()}, | ||||||
|  |                                                                {"api-version", API_VERSION}}); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| } // namespace WebService
 | } // namespace WebService
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue