mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 16:23:11 +08:00
Default datasource and event system test
This commit is contained in:
@ -64,12 +64,13 @@ func AddDataSource(c *middleware.Context) {
|
||||
|
||||
cmd.AccountId = c.Account.Id
|
||||
|
||||
err := bus.Dispatch(&cmd)
|
||||
if err != nil {
|
||||
if err := bus.Dispatch(&cmd); err != nil {
|
||||
c.JsonApiErr(500, "Failed to add datasource", err)
|
||||
return
|
||||
}
|
||||
|
||||
//bus.Publish(&m.DataSourceCreatedEvent{Account: c.GetAccountId(), })
|
||||
|
||||
c.JsonOK("Datasource added")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user