Commit d68bfaa8 by bergquist

datasource as cfg: typo

parent da6430ac
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment