Skip to content

Commit 87623b5

Browse files
authored
Merge pull request #7 from Paca-AI/fix/jsonbody-tinygo-collision
Fix TinyGo JSONBody[T] type-name collision
2 parents 6e2bb38 + 6aa565b commit 87623b5

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

backend/panels.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,10 @@ func (p *dashboardPlugin) updatePanelLayoutForView(req *plugin.Request, res *plu
294294
return
295295
}
296296

297-
type body struct {
297+
type updatePanelLayoutBody struct {
298298
Panels []panelLayoutEntry `json:"panels"`
299299
}
300-
b, err := plugin.JSONBody[body](req)
300+
b, err := plugin.JSONBody[updatePanelLayoutBody](req)
301301
if err != nil {
302302
res.Error(400, "invalid request body")
303303
return
@@ -390,10 +390,10 @@ func (p *dashboardPlugin) runPanelQueryForView(req *plugin.Request, res *plugin.
390390
// equivalent) — validates and runs a not-yet-saved query so the panel
391391
// editor can show a live preview before the user hits Save.
392392
func (p *dashboardPlugin) previewQuery(req *plugin.Request, res *plugin.Response, requireProjectScope bool) {
393-
type body struct {
393+
type previewQueryBody struct {
394394
Query string `json:"query"`
395395
}
396-
b, err := plugin.JSONBody[body](req)
396+
b, err := plugin.JSONBody[previewQueryBody](req)
397397
if err != nil {
398398
res.Error(400, "invalid request body")
399399
return

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "com.paca.dashboard",
33
"displayName": "Dashboard",
44
"description": "Customizable panel-based dashboard builder (charts, tables, text) across the project dashboard page, the admin dashboard page, and a single dashboard per Integration-page view (backlog/sprint/timeline).",
5-
"version": "0.3.2",
5+
"version": "0.3.3",
66
"minCoreVersion": "v0.13.3",
77
"permissions": ["db.read", "db.write", "events.subscribe", "cache"],
88
"backend": {

0 commit comments

Comments
 (0)