mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
新增:历史记录分页
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user