[Feature] Function status

This commit is contained in:
Denis Makogon
2017-06-06 14:12:50 -07:00
parent 6334f44a72
commit 3f065ce6bf
29 changed files with 1165 additions and 564 deletions

22
api/server/call_get.go Normal file
View File

@@ -0,0 +1,22 @@
package server
import (
"context"
"net/http"
"github.com/gin-gonic/gin"
"gitlab-odx.oracle.com/odx/functions/api"
)
func (s *Server) handleCallGet(c *gin.Context) {
ctx := c.MustGet("ctx").(context.Context)
callID := c.Param(api.Call)
callObj, err := s.Datastore.GetTask(ctx, callID)
if err != nil {
handleErrorResponse(c, err)
return
}
c.JSON(http.StatusOK, fnCallResponse{"Successfully loaded call", callObj})
}