forked from loafle/openapi-generator-original
[C++][Pistache] Rename value holder to lower chance of collision with parameter name (#4948)
* [C++][Pistache] Rename value holder to lower chance of collision with parameter name * [C++][Pistache] Update Petstore sample
This commit is contained in:
committed by
sunn
parent
2bc3c196e8
commit
6af27d52ca
@@ -143,17 +143,17 @@ void UserApi::login_user_handler(const Pistache::Rest::Request &request, Pistach
|
||||
auto usernameQuery = request.query().get("username");
|
||||
Pistache::Optional<std::string> username;
|
||||
if(!usernameQuery.isEmpty()){
|
||||
std::string value;
|
||||
if(fromStringValue(usernameQuery.get(), value)){
|
||||
username = Pistache::Some(value);
|
||||
std::string valueQuery_instance;
|
||||
if(fromStringValue(usernameQuery.get(), valueQuery_instance)){
|
||||
username = Pistache::Some(valueQuery_instance);
|
||||
}
|
||||
}
|
||||
auto passwordQuery = request.query().get("password");
|
||||
Pistache::Optional<std::string> password;
|
||||
if(!passwordQuery.isEmpty()){
|
||||
std::string value;
|
||||
if(fromStringValue(passwordQuery.get(), value)){
|
||||
password = Pistache::Some(value);
|
||||
std::string valueQuery_instance;
|
||||
if(fromStringValue(passwordQuery.get(), valueQuery_instance)){
|
||||
password = Pistache::Some(valueQuery_instance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user