Fix return code initialization in access token generation.

Brace-initialization won't work here because return_call is a struct without
initializer.
This commit is contained in:
tastytea 2019-12-28 05:54:52 +01:00
parent 35afb2800e
commit ebf5a2cd00
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -36,7 +36,6 @@ using std::ofstream;
using std::cin;
using std::cout;
using std::stringstream;
using std::runtime_error;
using std::getline;
using std::move;
@ -193,13 +192,10 @@ string Config::get_access_token(const string &instance) const
string url;
Mastodon::API masto(instance, "");
Mastodon::return_call ret
{
masto.register_app1("mastorss", "urn:ietf:wg:oauth:2.0:oob",
"write",
"https://schlomp.space/tastytea/mastorss",
client_id, client_secret, url)
};
auto ret = masto.register_app1("mastorss", "urn:ietf:wg:oauth:2.0:oob",
"write",
"https://schlomp.space/tastytea/mastorss",
client_id, client_secret, url);
if (ret)
{