datasource as cfg: typo

pull/9594/head
bergquist 8 years ago
parent da6430ac01
commit d68bfaa8be
  1. 2
      pkg/api/datasources.go
  2. 7
      pkg/models/datasource.go
  3. 2
      pkg/services/sqlstore/datasource.go

@ -139,7 +139,7 @@ func UpdateDataSource(c *middleware.Context, cmd m.UpdateDataSourceCommand) Resp
err = bus.Dispatch(&cmd)
if err != nil {
if err == m.ErrDataSouceUpdatingOldVersion {
if err == m.ErrDataSourceUpdatingOldVersion {
return ApiError(500, "Failed to update datasource. Reload new version and try again", err)
} else {
return ApiError(500, "Failed to update datasource", err)

@ -23,11 +23,10 @@ const (
DS_ACCESS_PROXY = "proxy"
)
// Typed errors
var (
ErrDataSourceNotFound = errors.New("Data source not found")
ErrDataSourceNameExists = errors.New("Data source with same name already exists")
ErrDataSouceUpdatingOldVersion = errors.New("Trying to update old version of datasouce")
ErrDataSourceNotFound = errors.New("Data source not found")
ErrDataSourceNameExists = errors.New("Data source with same name already exists")
ErrDataSourceUpdatingOldVersion = errors.New("Trying to update old version of datasource")
)
type DsAccess string

@ -167,7 +167,7 @@ func UpdateDataSource(cmd *m.UpdateDataSourceCommand) error {
}
if affected == 0 {
return m.ErrDataSouceUpdatingOldVersion
return m.ErrDataSourceUpdatingOldVersion
}
err = updateIsDefaultFlag(ds, sess)

Loading…
Cancel
Save