fix missing category

This commit is contained in:
ShyMike
2025-07-23 23:36:55 +01:00
parent f4a6b325a6
commit 845f8e4423

View File

@@ -236,6 +236,9 @@ class Api::Hackatime::V1::HackatimeController < ApplicationController
parsed_ua = WakatimeService.parse_user_agent(heartbeat[:user_agent])
# if category is not set, just default to coding
heartbeat[:category] ||= "coding"
# special case: if the entity is "test.txt", this is a test heartbeat
if heartbeat[:entity] == "test.txt"
source_type = :test_entry