diff --git a/cmd/cc-backend/cli.go b/cmd/cc-backend/cli.go index 8b41261..af32b64 100644 --- a/cmd/cc-backend/cli.go +++ b/cmd/cc-backend/cli.go @@ -2,6 +2,7 @@ // All rights reserved. This file is part of cc-backend. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. + // Package main provides the entry point for the ClusterCockpit backend server. // This file defines all command-line flags and their default values. package main diff --git a/cmd/cc-backend/init.go b/cmd/cc-backend/init.go index a1a4c6c..3ccb67a 100644 --- a/cmd/cc-backend/init.go +++ b/cmd/cc-backend/init.go @@ -2,6 +2,7 @@ // All rights reserved. This file is part of cc-backend. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. + // Package main provides the entry point for the ClusterCockpit backend server. // This file contains bootstrap logic for initializing the environment, // creating default configuration files, and setting up the database. diff --git a/cmd/cc-backend/main.go b/cmd/cc-backend/main.go index 4b369fc..ce721b7 100644 --- a/cmd/cc-backend/main.go +++ b/cmd/cc-backend/main.go @@ -2,6 +2,7 @@ // All rights reserved. This file is part of cc-backend. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. + // Package main provides the entry point for the ClusterCockpit backend server. // It orchestrates initialization of all subsystems including configuration, // database, authentication, and the HTTP server. @@ -266,7 +267,7 @@ func generateJWT(authHandle *auth.Authentication, username string) error { } func initSubsystems() error { - // Initialize archive + // Initialize job archive archiveCfg := ccconf.GetPackageConfig("archive") if archiveCfg == nil { archiveCfg = json.RawMessage(defaultArchiveConfig) @@ -399,7 +400,6 @@ func runServer(ctx context.Context) error { func run() error { cliInit() - // Handle version flag if flagVersion { printVersion() return nil diff --git a/internal/api/rest.go b/internal/api/rest.go index dcc4b2d..7df7292 100644 --- a/internal/api/rest.go +++ b/internal/api/rest.go @@ -116,6 +116,11 @@ func (api *RestApi) MountMetricStoreApiRoutes(r *mux.Router) { r.HandleFunc("/api/write", writeMetrics).Methods(http.MethodPost) r.HandleFunc("/api/debug", debugMetrics).Methods(http.MethodGet) r.HandleFunc("/api/healthcheck", metricsHealth).Methods(http.MethodGet) + // Same endpoints but with trailing slash + r.HandleFunc("/api/free/", freeMetrics).Methods(http.MethodPost) + r.HandleFunc("/api/write/", writeMetrics).Methods(http.MethodPost) + r.HandleFunc("/api/debug/", debugMetrics).Methods(http.MethodGet) + r.HandleFunc("/api/healthcheck/", metricsHealth).Methods(http.MethodGet) } func (api *RestApi) MountConfigApiRoutes(r *mux.Router) {