mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-26 02:29:08 +01:00
format api routes
This commit is contained in:
@@ -177,7 +177,13 @@ func registerRoutes(r *gin.Engine, db *gorm.DB, svc *services, rateLimitServices
|
||||
|
||||
// These are not rate-limited.
|
||||
controller.NewHealthzController(r)
|
||||
httpapi.AddRawOperation(api, "healthz", http.MethodGet, "/healthz", "Health check", []string{"Health"}, nil, http.StatusNoContent)
|
||||
httpapi.AddRawOperation(api, huma.Operation{
|
||||
OperationID: "healthz",
|
||||
Method: http.MethodGet,
|
||||
Path: "/healthz",
|
||||
Summary: "Health check",
|
||||
Tags: []string{"Health"},
|
||||
}, http.StatusNoContent)
|
||||
|
||||
// Receives OTLP trace payloads from the browser SPA (POST /internal/telemetry/traces) and forwards them to the collector, when trace export is enabled.
|
||||
// Outside /api, so it's unauthenticated and not traced, but it is rate-limited.
|
||||
|
||||
@@ -28,7 +28,7 @@ func TestHumaRouterOpenAPI(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
scheduler, err := job.NewScheduler()
|
||||
require.NoError(t, err)
|
||||
services, err := initServices(t.Context(), db, http.DefaultClient, map[string]string{}, fileStorage, scheduler)
|
||||
services, err := initServices(t.Context(), db, "test-instance", http.DefaultClient, map[string]string{}, fileStorage, scheduler)
|
||||
require.NoError(t, err)
|
||||
router, err := initEngine()
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user