|
|
@@ -398,34 +398,6 @@ func getPorterAppRoutes(
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
- // GET /api/projects/{project_id}/clusters/{cluster_id}/events/id -> porter_app.NewGetPorterAppEventHandler
|
|
|
- getPorterAppEventEndpoint := factory.NewAPIEndpoint(
|
|
|
- &types.APIRequestMetadata{
|
|
|
- Verb: types.APIVerbCreate,
|
|
|
- Method: types.HTTPVerbGet,
|
|
|
- Path: &types.Path{
|
|
|
- Parent: basePath,
|
|
|
- RelativePath: fmt.Sprintf("/events/{%s}", types.URLParamPorterAppEventID),
|
|
|
- },
|
|
|
- Scopes: []types.PermissionScope{
|
|
|
- types.UserScope,
|
|
|
- types.ProjectScope,
|
|
|
- types.ClusterScope,
|
|
|
- },
|
|
|
- },
|
|
|
- )
|
|
|
-
|
|
|
- getPorterAppEventHandler := porter_app.NewGetPorterAppEventHandler(
|
|
|
- config,
|
|
|
- factory.GetResultWriter(),
|
|
|
- )
|
|
|
-
|
|
|
- routes = append(routes, &router.Route{
|
|
|
- Endpoint: getPorterAppEventEndpoint,
|
|
|
- Handler: getPorterAppEventHandler,
|
|
|
- Router: r,
|
|
|
- })
|
|
|
-
|
|
|
// POST /api/projects/{project_id}/clusters/{cluster_id}/applications/analytics -> porter_app.NewPorterAppAnalyticsHandler
|
|
|
porterAppAnalyticsEndpoint := factory.NewAPIEndpoint(
|
|
|
&types.APIRequestMetadata{
|
|
|
@@ -1763,5 +1735,33 @@ func getPorterAppRoutes(
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
+ // GET /api/projects/{project_id}/clusters/{cluster_id}/apps/{porter_app_name}/events/id -> porter_app.NewGetPorterAppEventHandler
|
|
|
+ getPorterAppEventEndpoint := factory.NewAPIEndpoint(
|
|
|
+ &types.APIRequestMetadata{
|
|
|
+ Verb: types.APIVerbCreate,
|
|
|
+ Method: types.HTTPVerbGet,
|
|
|
+ Path: &types.Path{
|
|
|
+ Parent: basePath,
|
|
|
+ RelativePath: fmt.Sprintf("%s/{%s}/events/{%s}", relPathV2, types.URLParamPorterAppName, types.URLParamPorterAppEventID),
|
|
|
+ },
|
|
|
+ Scopes: []types.PermissionScope{
|
|
|
+ types.UserScope,
|
|
|
+ types.ProjectScope,
|
|
|
+ types.ClusterScope,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ )
|
|
|
+
|
|
|
+ getPorterAppEventHandler := porter_app.NewGetPorterAppEventHandler(
|
|
|
+ config,
|
|
|
+ factory.GetResultWriter(),
|
|
|
+ )
|
|
|
+
|
|
|
+ routes = append(routes, &router.Route{
|
|
|
+ Endpoint: getPorterAppEventEndpoint,
|
|
|
+ Handler: getPorterAppEventHandler,
|
|
|
+ Router: r,
|
|
|
+ })
|
|
|
+
|
|
|
return routes, newPath
|
|
|
}
|