mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
23 lines
417 B
Go
23 lines
417 B
Go
package server
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
|
)
|
|
|
|
func (s *Server) handleAppList(c *gin.Context) {
|
|
ctx := c.Request.Context()
|
|
|
|
filter := &models.AppFilter{}
|
|
|
|
apps, err := s.Datastore.GetApps(ctx, filter)
|
|
if err != nil {
|
|
handleErrorResponse(c, err)
|
|
return
|
|
}
|
|
|
|
c.JSON(http.StatusOK, appsResponse{"Successfully listed applications", apps})
|
|
}
|