Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions backend/timelogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
Loading