mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
23 lines
433 B
Go
23 lines
433 B
Go
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})
|
|
}
|