diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-12-18 19:29:06 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-12-18 19:29:06 +0000 |
commit | 644f6cb4382860cd77c1f1697a6bb310f6a67567 (patch) | |
tree | 6f353587dadcb81e6d33d74893df85aff2cad9ec /lualib/lua_selectors/extractors.lua | |
parent | 623d10c48edb37988d71ece45dc34d5a869ca397 (diff) | |
download | rspamd-644f6cb4382860cd77c1f1697a6bb310f6a67567.tar.gz rspamd-644f6cb4382860cd77c1f1697a6bb310f6a67567.zip |
[Minor] Fix arguments schema
Diffstat (limited to 'lualib/lua_selectors/extractors.lua')
-rw-r--r-- | lualib/lua_selectors/extractors.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lualib/lua_selectors/extractors.lua b/lualib/lua_selectors/extractors.lua index 581add2a7..334fb4774 100644 --- a/lualib/lua_selectors/extractors.lua +++ b/lualib/lua_selectors/extractors.lua @@ -302,7 +302,7 @@ e.g. `get_tld`]], return urls,'userdata_list' end, ['description'] = [[Get most specific urls. Arguments are equal to the Lua API function]], - ['args_schema'] = {ts.shape{ + ['args_schema'] = ts.shape{ limit = ts.number + ts.string / tonumber, esld_limit = (ts.number + ts.string / tonumber):is_optional(), exclude_flags = url_flags_ts, @@ -313,7 +313,7 @@ e.g. `get_tld`]], need_emails = (ts.boolean + ts.string / lua_util.toboolean):is_optional(), need_images = (ts.boolean + ts.string / lua_util.toboolean):is_optional(), ignore_redirected = (ts.boolean + ts.string / lua_util.toboolean):is_optional(), - }} + } }, ['specific_urls_filter_map'] = { ['get_value'] = function(task, args) @@ -334,7 +334,7 @@ e.g. `get_tld`]], return fun.filter(function(u) return map:get_key(tostring(u)) end, urls),'userdata_list' end, ['description'] = [[Get most specific urls, filtered by some map. Arguments are equal to the Lua API function]], - ['args_schema'] = {ts.array_of{ts.string, ts.shape{ + ['args_schema'] = {ts.string, ts.shape{ limit = ts.number + ts.string / tonumber, esld_limit = (ts.number + ts.string / tonumber):is_optional(), exclude_flags = url_flags_ts, @@ -345,7 +345,7 @@ e.g. `get_tld`]], need_emails = (ts.boolean + ts.string / lua_util.toboolean):is_optional(), need_images = (ts.boolean + ts.string / lua_util.toboolean):is_optional(), ignore_redirected = (ts.boolean + ts.string / lua_util.toboolean):is_optional(), - }}} + }} }, -- URLs filtered by flags ['urls_filtered'] = { |