mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
ircd:Ⓜ️:resource: Unstable is also a version (undocumented).
This commit is contained in:
parent
b2682d4e63
commit
a2197e87df
1 changed files with 8 additions and 1 deletions
|
@ -144,7 +144,7 @@ ircd::m::resource::path_version(const string_view &path)
|
||||||
token(path, '/', 2, {})
|
token(path, '/', 2, {})
|
||||||
};
|
};
|
||||||
|
|
||||||
const bool pass
|
const bool is_version
|
||||||
{
|
{
|
||||||
true
|
true
|
||||||
&& version.size() >= 2
|
&& version.size() >= 2
|
||||||
|
@ -152,6 +152,13 @@ ircd::m::resource::path_version(const string_view &path)
|
||||||
&& (version[1] >= '0' && version[1] <= '9')
|
&& (version[1] >= '0' && version[1] <= '9')
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const bool pass
|
||||||
|
{
|
||||||
|
false
|
||||||
|
|| is_version
|
||||||
|
|| version == "unstable"
|
||||||
|
};
|
||||||
|
|
||||||
return pass? version: string_view{};
|
return pass? version: string_view{};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue