fix: response need delay total
This commit is contained in:
parent
2b3875be66
commit
3d0e6d927a
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
gitea-client (0.9.0)
|
||||
gitea-client (0.10.0)
|
||||
rest-client (~> 2.1.0)
|
||||
|
||||
GEM
|
||||
|
|
|
@ -104,7 +104,11 @@ module Gitea
|
|||
response.return!
|
||||
end
|
||||
|
||||
JSON.parse(response) rescue {}
|
||||
if response.headers.has_key?(:x_total)
|
||||
return {data: JSON.parse(response), total_data: response.headers[:x_total]}
|
||||
else
|
||||
return JSON.parse(response)
|
||||
end rescue {}
|
||||
end
|
||||
|
||||
def get_user_agent
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitea
|
||||
VERSION = "0.9.0"
|
||||
VERSION = "0.10.0"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue