mirror of
				https://gitlab.com/comunic/comunicterm
				synced 2025-11-04 12:14:04 +00:00 
			
		
		
		
	Get current user ID
This commit is contained in:
		@@ -39,6 +39,12 @@ LoginResult AccountHelper::Login(const std::string &email, const std::string &pa
 | 
			
		||||
    AccountHelper::mToken1 = tokens.at("token1").as_string();
 | 
			
		||||
    AccountHelper::mToken2 = tokens.at("token2").as_string();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // Get current user ID
 | 
			
		||||
    auto response = ApiRequest("user/getCurrentUserID", true).exec();
 | 
			
		||||
    if(response.code() != 200) return ERROR;
 | 
			
		||||
    AccountHelper::mUserID = response.object().at("userID").as_number().to_int32();
 | 
			
		||||
 | 
			
		||||
    return SUCCESS;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user