Skip to content

Commit

Permalink
Fixed payload parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
matisiekpl committed Sep 13, 2023
1 parent 3f8758b commit 65ba53f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/controller/report.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package controller

import (
"encoding/json"
"github.com/labstack/echo/v4"
"github.com/matisiekpl/pansa-plan/internal/model"
"github.com/matisiekpl/pansa-plan/internal/service"
Expand All @@ -17,7 +18,7 @@ type reportController struct {

func (r reportController) Generate(c echo.Context) error {
var plan model.Plan
err := c.Bind(&plan)
err := json.Unmarshal([]byte(c.QueryParam("payload")), &plan)
if err != nil {
return err
}
Expand Down

0 comments on commit 65ba53f

Please sign in to comment.