Commit 10c254f6 by mingyuan

to format s

parent 46329c63
......@@ -32,8 +32,8 @@ module Dingtalk::Api
def sign_header(method, path, params = {}, payload = {})
headers = {
apiKey: app.app_key,
'X-Hmac-Auth-Timestamp': Time.now.to_s(:iso8601),
'X-Hmac-Auth-Nonce': (Time.now.to_f * 1000).round.to_s + rand(1000..9999).to_s,
'X-Hmac-Auth-Timestamp': Time.current.to_formatted_s(:iso8601),
'X-Hmac-Auth-Nonce': (Time.current.to_f * 1000).round.to_s + rand(1000..9999).to_s,
'X-Hmac-Auth-Version': '1.0',
'X-Hmac-Auth-IP': RailsDingtalk.config.ip,
'X-Hmac-Auth-MAC': RailsDingtalk.config.mac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment