mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Ensure app exists before listing its routes
This commit is contained in:
@@ -23,6 +23,9 @@ func (s *Server) handleRouteList(c *gin.Context) {
|
||||
name, ok := appName.(string)
|
||||
if exists && ok && name != "" {
|
||||
routes, err = s.Datastore.GetRoutesByApp(ctx, name, filter)
|
||||
if len(routes) == 0 {
|
||||
_, err = s.Datastore.GetApp(ctx, name)
|
||||
}
|
||||
} else {
|
||||
routes, err = s.Datastore.GetRoutes(ctx, filter)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user