Browse Source

datasource as cfg: typo

bergquist 8 years ago
parent
commit
d68bfaa8be
3 changed files with 5 additions and 6 deletions
  1. 1 1
      pkg/api/datasources.go
  2. 3 4
      pkg/models/datasource.go
  3. 1 1
      pkg/services/sqlstore/datasource.go

+ 1 - 1
pkg/api/datasources.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)

+ 3 - 4
pkg/models/datasource.go

@@ -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

+ 1 - 1
pkg/services/sqlstore/datasource.go

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