publicdashboards: split create/update api paths (#57940)
This PR splits the create and update paths for public dashboards and includes assorted refactors toward a proper REST API. Additionally, we removed the concept of a "public dashboard config" in favor of "public dashboard" Co-authored-by: juanicabanas <juan.cabanas@grafana.com> Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
This commit is contained in:
co-authored by
juanicabanas
Ezequiel Victorero
parent
0367f61bb3
commit
6fcc5b42c0
@@ -257,7 +257,7 @@ func TestIntegrationDashboardDataAccess(t *testing.T) {
|
||||
AccessToken: "an-access-token",
|
||||
},
|
||||
}
|
||||
err := publicDashboardStore.Save(context.Background(), cmd)
|
||||
_, err := publicDashboardStore.Create(context.Background(), cmd)
|
||||
require.NoError(t, err)
|
||||
pubdashConfig, _ := publicDashboardStore.FindByAccessToken(context.Background(), "an-access-token")
|
||||
require.NotNil(t, pubdashConfig)
|
||||
@@ -292,7 +292,7 @@ func TestIntegrationDashboardDataAccess(t *testing.T) {
|
||||
AccessToken: "an-access-token",
|
||||
},
|
||||
}
|
||||
err := publicDashboardStore.Save(context.Background(), cmd)
|
||||
_, err := publicDashboardStore.Create(context.Background(), cmd)
|
||||
require.NoError(t, err)
|
||||
pubdashConfig, _ := publicDashboardStore.FindByAccessToken(context.Background(), "an-access-token")
|
||||
require.NotNil(t, pubdashConfig)
|
||||
|
||||
Reference in New Issue
Block a user