API: Add by UID routes for data sources (#29884)

- also add Get by UID+OrgID to datasource cache
- Refactor backend commands for Delete and Get to be unified
This commit is contained in:
Kyle Brandt
2021-01-13 13:16:27 -05:00
committed by GitHub
parent d5cbb17666
commit 1c1a800bc0
18 changed files with 295 additions and 89 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ func TestAlertRuleExtraction(t *testing.T) {
return nil
})
bus.AddHandler("test", func(query *models.GetDataSourceByNameQuery) error {
bus.AddHandler("test", func(query *models.GetDataSourceQuery) error {
if query.Name == defaultDs.Name {
query.Result = defaultDs
}