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
8 changes: 4 additions & 4 deletions backend/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ func (p *examplePlugin) listHello(req *plugin.Request, res *plugin.Response) {
}

func (p *examplePlugin) createHello(req *plugin.Request, res *plugin.Response) {
type body struct {
type createHelloBody struct {
Name string `json:"name"`
TaskID string `json:"task_id"`
}

payload, err := plugin.JSONBody[body](req)
payload, err := plugin.JSONBody[createHelloBody](req)
if err != nil {
res.Error(400, "invalid JSON body")
return
Expand Down Expand Up @@ -165,11 +165,11 @@ func (p *examplePlugin) updateHello(req *plugin.Request, res *plugin.Response) {
return
}

type body struct {
type updateHelloBody struct {
Name string `json:"name"`
}

payload, err := plugin.JSONBody[body](req)
payload, err := plugin.JSONBody[updateHelloBody](req)
if err != nil {
res.Error(400, "invalid JSON 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.example",
"displayName": "Plugin SDK Hello World",
"description": "Hello world examples for every Paca plugin SDK feature.",
"version": "0.1.1",
"version": "0.1.2",
"minCoreVersion": "v0.13.3",
"permissions": ["db.read", "db.write", "events.subscribe", "events.emit"],
"backend": {
Expand Down
Loading