新增:历史记录分页

This commit is contained in:
2024-05-09 13:41:46 +08:00
parent fd48f00097
commit e0b1d6fbb6
4 changed files with 20 additions and 3 deletions

View File

@@ -95,4 +95,21 @@ class Reposync::ClientService < ApplicationService
end
end
end
def render_list_response(response)
status = response.status
body = JSON.parse(response&.body)
log_error(status, body)
if status == 200
if body["code_status"].to_i == 0
return [body["code_status"], body["data"], body["total"], body["msg"]]
else
puts "[reposync][ERROR] code: #{body["code_status"]}"
puts "[reposync][ERROR] message: #{body["msg"]}"
return [body["code_status"], body["data"], body["total"], body["msg"]]
end
end
end
end

View File

@@ -11,7 +11,7 @@ class Reposync::GetLogsService < Reposync::ClientService
def call
result = get(url, request_params)
response = render_response(result)
response = render_list_response(result)
end
private