mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
@@ -15,6 +15,11 @@ func (s *Server) handleRouteDelete(c *gin.Context) {
|
||||
appName := c.MustGet(api.AppName).(string)
|
||||
routePath := path.Clean(c.MustGet(api.Path).(string))
|
||||
|
||||
if _, err := s.Datastore.GetRoute(ctx, appName, routePath); err != nil {
|
||||
handleErrorResponse(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if err := s.Datastore.RemoveRoute(ctx, appName, routePath); err != nil {
|
||||
handleErrorResponse(c, err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user