Fix mirror auth

This commit is contained in:
Mahad Kalam 2026-02-23 20:46:28 +00:00
parent 1a28bc744a
commit 5bd4b7b0c7

View file

@ -24,7 +24,7 @@ class WakatimeMirror < ApplicationRecord
def post_heartbeats(payload)
HTTP.timeout(connect: 5, read: 30, write: 10)
.headers(
"Authorization" => "Basic #{Base64.strict_encode64("#{encrypted_api_key}:")}",
"Authorization" => "Basic #{Base64.strict_encode64(encrypted_api_key)}",
"Content-Type" => "application/json"
)
.post("#{endpoint_url}/users/current/heartbeats.bulk", json: payload)