<commit_before>package router

import (
	"github.com/gin-gonic/gin"
	"github.com/iron-io/functions/api/models"
)

func Start(engine *gin.Engine) {
	engine.GET("/", handlePing)
	engine.GET("/version", handleVersion)

	v1 := engine.Group("/v1")
	{
		v1.GET("/apps", handleAppList)
		v1.POST("/apps", handleAppCreate)

		v1.GET("/apps/:app", handleAppGet)
		v1.PUT("/apps/:app", handleAppUpdate)
		v1.DELETE("/apps/:app", handleAppDelete)

		apps := v1.Group("/apps/:app")
		{
			apps.GET("/routes", handleRouteList)
			apps.POST("/routes", handleRouteCreate)
			apps.GET("/routes/:route", handleRouteGet)
			apps.POST("/routes/:route", handleRouteUpdate)
			apps.DELETE("/routes/:route", handleRouteDelete)
		}

	}

	engine.Any("/r/:app/*route", handleRunner)
	engine.NoRoute(handleRunner)
}

func simpleError(err error) *models.Error {
	return &models.Error{&models.ErrorBody{Message: err.Error()}}
}
<commit_msg>fixed method for route update<commit_after>package router

import (
	"github.com/gin-gonic/gin"
	"github.com/iron-io/functions/api/models"
)

func Start(engine *gin.Engine) {
	engine.GET("/", handlePing)
	engine.GET("/version", handleVersion)

	v1 := engine.Group("/v1")
	{
		v1.GET("/apps", handleAppList)
		v1.POST("/apps", handleAppCreate)

		v1.GET("/apps/:app", handleAppGet)
		v1.PUT("/apps/:app", handleAppUpdate)
		v1.DELETE("/apps/:app", handleAppDelete)

		apps := v1.Group("/apps/:app")
		{
			apps.GET("/routes", handleRouteList)
			apps.POST("/routes", handleRouteCreate)
			apps.GET("/routes/:route", handleRouteGet)
			apps.PUT("/routes/:route", handleRouteUpdate)
			apps.DELETE("/routes/:route", handleRouteDelete)
		}

	}

	engine.Any("/r/:app/*route", handleRunner)
	engine.NoRoute(handleRunner)
}

func simpleError(err error) *models.Error {
	return &models.Error{&models.ErrorBody{Message: err.Error()}}
}

{'fraction_non_alphanumeric': 0.19032082653616095, 'fraction_numerical': 0.008700380641653072, 'mean_word_length': 4.592705167173253, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6314843', 'n_tokens_mistral': 691, 'n_tokens_neox': 670, 'n_words': 96}