On Mon, Feb 07, 2022 at 04:02:52PM +0800, Li Ping wrote:
[why] if no parameter is transferred, the default value is not set, As a result, data cannot be obtained.
我已经撤销了这个patch,合入最新的patch。
Thanks, Jihui
Signed-off-by: Li Ping 1477412247@qq.com
src/lib/web_backend.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lib/web_backend.rb b/src/lib/web_backend.rb index f47950e6..571d7c64 100644 --- a/src/lib/web_backend.rb +++ b/src/lib/web_backend.rb @@ -1026,8 +1026,10 @@ end def get_srpm_info(params) begin my_data = MyData.new
- page_size = params['page_size'] || 10
- page_num = params['page_num'] || 0 info=[]
- srpm_infos = my_data.get_srpm_info(size: params['page_size'].to_i, from: params['page_num'].to_i)
- srpm_infos = my_data.get_srpm_info(size: page_size, from: page_num) srpm_infos['hits']['hits'].each do |source| info << source['_source'] end
-- 2.23.0