feat: endpoints de mutacion y de projects
- handlers_mutations.go: POST add_app/add_analysis/add_vault/reindex - handlers_projects.go: GET projects y project detail (apps/analysis/vaults nested) - handlers.go + main.go: cablear nuevas rutas - handlers_test.go: ajustes minimos - app.md: documentar endpoints v0.2 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+7
-7
@@ -45,7 +45,7 @@ func setupTestDB(t *testing.T) (*DBPool, string) {
|
||||
|
||||
func TestHealthEndpoint(t *testing.T) {
|
||||
pool := NewDBPool()
|
||||
srv := NewServer(pool)
|
||||
srv := NewServer(pool, "")
|
||||
mux := http.NewServeMux()
|
||||
srv.Routes(mux)
|
||||
|
||||
@@ -68,7 +68,7 @@ func TestDatabasesEndpoint(t *testing.T) {
|
||||
pool.Register(DBEntry{Alias: "registry", Path: "/fake/path", Kind: "registry"})
|
||||
pool.Register(DBEntry{Alias: "ops:myapp", Path: "/fake/path2", Kind: "operations"})
|
||||
|
||||
srv := NewServer(pool)
|
||||
srv := NewServer(pool, "")
|
||||
mux := http.NewServeMux()
|
||||
srv.Routes(mux)
|
||||
|
||||
@@ -90,7 +90,7 @@ func TestQueryEndpoint(t *testing.T) {
|
||||
pool, _ := setupTestDB(t)
|
||||
defer pool.Close()
|
||||
|
||||
srv := NewServer(pool)
|
||||
srv := NewServer(pool, "")
|
||||
mux := http.NewServeMux()
|
||||
srv.Routes(mux)
|
||||
|
||||
@@ -119,7 +119,7 @@ func TestQueryRejectsWrite(t *testing.T) {
|
||||
pool, _ := setupTestDB(t)
|
||||
defer pool.Close()
|
||||
|
||||
srv := NewServer(pool)
|
||||
srv := NewServer(pool, "")
|
||||
mux := http.NewServeMux()
|
||||
srv.Routes(mux)
|
||||
|
||||
@@ -146,7 +146,7 @@ func TestTablesEndpoint(t *testing.T) {
|
||||
pool, _ := setupTestDB(t)
|
||||
defer pool.Close()
|
||||
|
||||
srv := NewServer(pool)
|
||||
srv := NewServer(pool, "")
|
||||
mux := http.NewServeMux()
|
||||
srv.Routes(mux)
|
||||
|
||||
@@ -178,7 +178,7 @@ func TestSchemaEndpoint(t *testing.T) {
|
||||
pool, _ := setupTestDB(t)
|
||||
defer pool.Close()
|
||||
|
||||
srv := NewServer(pool)
|
||||
srv := NewServer(pool, "")
|
||||
mux := http.NewServeMux()
|
||||
srv.Routes(mux)
|
||||
|
||||
@@ -200,7 +200,7 @@ func TestSchemaEndpoint(t *testing.T) {
|
||||
|
||||
func TestNotFoundDB(t *testing.T) {
|
||||
pool := NewDBPool()
|
||||
srv := NewServer(pool)
|
||||
srv := NewServer(pool, "")
|
||||
mux := http.NewServeMux()
|
||||
srv.Routes(mux)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user