mirror of
https://github.com/matrix-construct/construct
synced 2024-07-21 09:58:46 +02:00
modules/console: More resource information.
This commit is contained in:
parent
01c97f1179
commit
6a06f2c89e
|
@ -3116,7 +3116,25 @@ bool
|
||||||
console_cmd__resource(opt &out, const string_view &line)
|
console_cmd__resource(opt &out, const string_view &line)
|
||||||
{
|
{
|
||||||
for(const auto &p : resource::resources)
|
for(const auto &p : resource::resources)
|
||||||
out << p.first << std::endl;
|
{
|
||||||
|
const auto &r(*p.second);
|
||||||
|
out << '`' << p.first << '\''
|
||||||
|
<< (r.flags & resource::DIRECTORY? " DIRECTORY" : "")
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
for(const auto &mp : p.second->methods)
|
||||||
|
{
|
||||||
|
const auto &m(*mp.second);
|
||||||
|
out << mp.first
|
||||||
|
<< (m.opts.flags & resource::method::REQUIRES_AUTH? " REQUIRES_AUTH" : "")
|
||||||
|
<< (m.opts.flags & resource::method::RATE_LIMITED? " RATE_LIMITED" : "")
|
||||||
|
<< (m.opts.flags & resource::method::VERIFY_ORIGIN? " VERIFY_ORIGIN" : "")
|
||||||
|
<< (m.opts.flags & resource::method::CONTENT_DISCRETION? " CONTENT_DISCRETION" : "")
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
out << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue