mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
API improvements (#410)
* api improvements, remove global Api object and reduce gin dependency * requested changes
This commit is contained in:
@@ -9,13 +9,13 @@ import (
|
||||
"github.com/iron-io/runner/common"
|
||||
)
|
||||
|
||||
func handleAppList(c *gin.Context) {
|
||||
func (s *Server) handleAppList(c *gin.Context) {
|
||||
ctx := c.MustGet("ctx").(context.Context)
|
||||
log := common.Logger(ctx)
|
||||
|
||||
filter := &models.AppFilter{}
|
||||
|
||||
apps, err := Api.Datastore.GetApps(ctx, filter)
|
||||
apps, err := s.Datastore.GetApps(ctx, filter)
|
||||
if err != nil {
|
||||
log.WithError(err).Debug(models.ErrAppsList)
|
||||
c.JSON(http.StatusInternalServerError, simpleError(models.ErrAppsList))
|
||||
|
||||
Reference in New Issue
Block a user