Skip to content

Commit db8e148

Browse files

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

polycode/task.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func sendStartApp(port int) {
8787

8888
func Start(params ...any) {
8989
if len(params) == 1 {
90-
g, ok := params[1].(*gin.Engine)
90+
g, ok := params[0].(*gin.Engine)
9191
if ok {
9292
httpHandler = g.Handler()
9393
}
@@ -100,12 +100,14 @@ func Start(params ...any) {
100100
}
101101

102102
func invokeApiHandler(c *gin.Context) {
103+
println("client: api request received")
103104
input := c.Request
104105
output := runTask(nil, input)
105106
c.JSON(http.StatusOK, output)
106107
}
107108

108109
func invokeServiceHandler(c *gin.Context) {
110+
println("client: service request received")
109111
var input TaskStartEvent
110112
if err := c.ShouldBindJSON(&input); err != nil {
111113
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid request"})

0 commit comments

Comments
 (0)