mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* Initial suypport for invoking tiggers * dupe method * tighten server constraints * runner tests not working yet * basic route tests passing * post rebase fixes * add hybrid support for trigger invoke and tests * consoloidate all hybrid evil into one place * cleanup and make triggers unique by source * fix oops with Agent * linting * review fixes
24 lines
441 B
Go
24 lines
441 B
Go
package server
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/fnproject/fn/api"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// TODO: Deprecate with V1 API
|
|
func (s *Server) handleV1AppGetByIdOrName(c *gin.Context) {
|
|
ctx := c.Request.Context()
|
|
|
|
param := c.MustGet(api.AppID).(string)
|
|
|
|
app, err := s.datastore.GetAppByID(ctx, param)
|
|
|
|
if err != nil {
|
|
handleV1ErrorResponse(c, err)
|
|
return
|
|
}
|
|
c.JSON(http.StatusOK, appResponse{"Successfully loaded app", app})
|
|
}
|