mirror of
https://github.com/matrix-construct/construct
synced 2024-11-10 12:01:15 +01:00
modules/console: More resource information.
This commit is contained in:
parent
01c97f1179
commit
6a06f2c89e
1 changed files with 19 additions and 1 deletions
|
@ -3116,7 +3116,25 @@ bool
|
|||
console_cmd__resource(opt &out, const string_view &line)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue