From 47538ca8103ede8f7b686cfa61b3e312c76eff3a Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Fri, 17 Jan 2025 13:59:12 +0100 Subject: [PATCH] fix: method name --- pkg/models/api_routes.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/models/api_routes.go b/pkg/models/api_routes.go index 6a51de678..7ae11e8b6 100644 --- a/pkg/models/api_routes.go +++ b/pkg/models/api_routes.go @@ -100,7 +100,7 @@ func getRouteDetail(route echo.Route) (method string, detail *RouteDetail) { } } -func ensureApiTokenRoutesGroup(group string) { +func ensureAPITokenRoutesGroup(group string) { if _, has := apiTokenRoutes[group]; !has { apiTokenRoutes[group] = make(APITokenRoute) } @@ -146,13 +146,13 @@ func CollectRoutesForAPITokenUsage(route echo.Route, middlewares []echo.Middlewa // Otherwise, we add it to the "other" key. if len(routeParts) == 1 { if routeGroupName == "notifications" && route.Method == http.MethodPost { - ensureApiTokenRoutesGroup("notifications") + ensureAPITokenRoutesGroup("notifications") apiTokenRoutes["notifications"]["mark_all_as_read"] = routeDetail return } - ensureApiTokenRoutesGroup("other") + ensureAPITokenRoutesGroup("other") _, exists := apiTokenRoutes["other"][routeGroupName] if exists { @@ -179,7 +179,7 @@ func CollectRoutesForAPITokenUsage(route echo.Route, middlewares []echo.Middlewa if strings.HasSuffix(routeGroupName, "_bulk") { parent := strings.TrimSuffix(routeGroupName, "_bulk") - ensureApiTokenRoutesGroup(parent) + ensureAPITokenRoutesGroup(parent) method, routeDetail := getRouteDetail(route) apiTokenRoutes[parent][method+"_bulk"] = routeDetail