mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
missing routers
This commit is contained in:
19
api/server/router/runner.go
Normal file
19
api/server/router/runner.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/iron-io/functions/api/runner"
|
||||
)
|
||||
|
||||
func handleRunner(c *gin.Context) {
|
||||
log := c.MustGet("log").(logrus.FieldLogger)
|
||||
|
||||
err := runner.Run(c)
|
||||
if err != nil {
|
||||
log.Debug(err)
|
||||
c.JSON(http.StatusInternalServerError, simpleError(err))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user