0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-02 21:59:02 +02:00

modules/console: Add cmd to trigger m::user::profile::fetch().

This commit is contained in:
Jason Volk 2019-03-06 18:10:18 -08:00
parent 33d3764c71
commit faf0914f23

View file

@ -9081,6 +9081,36 @@ console_cmd__user__profile(opt &out, const string_view &line)
return true;
}
bool
console_cmd__user__profile__fetch(opt &out, const string_view &line)
{
const params param{line, " ",
{
"user_id", "key", "remote"
}};
const m::user::id &user_id
{
param.at("user_id")
};
const string_view &key
{
param["key"]
};
const net::hostport &remote
{
param["remote"]?
param["remote"]:
user_id.host()
};
m::user::profile::fetch(user_id, remote, key);
out << "done" << std::endl;
return true;
}
bool
console_cmd__user__account_data(opt &out, const string_view &line)
{