diff --git a/backend/timelogs.go b/backend/timelogs.go index 3908b58..e8166b8 100644 --- a/backend/timelogs.go +++ b/backend/timelogs.go @@ -222,13 +222,13 @@ func (p *timeLoggingPlugin) createTimeLog(req *plugin.Request, res *plugin.Respo return } - type body struct { + type createTimeLogBody struct { SpentDate string `json:"spent_date"` MinutesSpent int `json:"minutes_spent"` Note string `json:"note"` MemberID *string `json:"member_id"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[createTimeLogBody](req) if err != nil { res.Error(400, "invalid request body") return @@ -328,12 +328,12 @@ func (p *timeLoggingPlugin) updateTimeLog(req *plugin.Request, res *plugin.Respo return } - type body struct { + type updateTimeLogBody struct { SpentDate *string `json:"spent_date"` MinutesSpent *int `json:"minutes_spent"` Note *string `json:"note"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[updateTimeLogBody](req) if err != nil { res.Error(400, "invalid request body") return @@ -486,12 +486,12 @@ func (p *timeLoggingPlugin) updateTimeLogGlobal(req *plugin.Request, res *plugin return } - type body struct { + type updateTimeLogGlobalBody struct { SpentDate *string `json:"spent_date"` MinutesSpent *int `json:"minutes_spent"` Note *string `json:"note"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[updateTimeLogGlobalBody](req) if err != nil { res.Error(400, "invalid request body") return diff --git a/plugin.json b/plugin.json index ee7b254..6602ed2 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "id": "com.paca.time-logging", "displayName": "Time Logging", "description": "Lets project members manually log time spent on tasks (date, duration, note) and view per-member totals for a project.", - "version": "0.2.2", + "version": "0.2.3", "minCoreVersion": "v0.13.3", "permissions": ["db.read", "db.write", "events.subscribe"], "customPermissions": [