datasource as cfg: typo

This commit is contained in:
bergquist 2017-10-25 11:29:19 +02:00
parent da6430ac01
commit d68bfaa8be
3 changed files with 5 additions and 6 deletions

View File

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

View File

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

View File

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