mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-24 22:08:58 -05:00
Fix formatting
This commit is contained in:
@@ -789,7 +789,7 @@ func TestListMultipleSettingsBundlesOfSameExtension(t *testing.T) {
|
||||
BundleKey: "alices-bundle",
|
||||
},
|
||||
DisplayName: "Alice's Bundle",
|
||||
Settings: dummySettings,
|
||||
Settings: dummySettings,
|
||||
},
|
||||
}
|
||||
_, err := cl.SaveSettingsBundle(context.Background(), &createRequest)
|
||||
@@ -802,7 +802,7 @@ func TestListMultipleSettingsBundlesOfSameExtension(t *testing.T) {
|
||||
BundleKey: "bobs-bundle",
|
||||
},
|
||||
DisplayName: "Bob's Bundle",
|
||||
Settings: dummySettings,
|
||||
Settings: dummySettings,
|
||||
},
|
||||
}
|
||||
_, err = cl.SaveSettingsBundle(context.Background(), &createRequest)
|
||||
@@ -815,7 +815,7 @@ func TestListMultipleSettingsBundlesOfSameExtension(t *testing.T) {
|
||||
BundleKey: "bobs-bundle",
|
||||
},
|
||||
DisplayName: "Bob's Bundle",
|
||||
Settings: dummySettings,
|
||||
Settings: dummySettings,
|
||||
},
|
||||
}
|
||||
_, err = cl.SaveSettingsBundle(context.Background(), &createRequest)
|
||||
@@ -845,7 +845,7 @@ func TestListAllSettingsBundlesOfSameExtension(t *testing.T) {
|
||||
BundleKey: "alices-bundle",
|
||||
},
|
||||
DisplayName: "Alice's Bundle",
|
||||
Settings: dummySettings,
|
||||
Settings: dummySettings,
|
||||
},
|
||||
}
|
||||
_, err := cl.SaveSettingsBundle(context.Background(), &createRequest)
|
||||
@@ -858,7 +858,7 @@ func TestListAllSettingsBundlesOfSameExtension(t *testing.T) {
|
||||
BundleKey: "bobs-bundle",
|
||||
},
|
||||
DisplayName: "Bob's Bundle",
|
||||
Settings: dummySettings,
|
||||
Settings: dummySettings,
|
||||
},
|
||||
}
|
||||
_, err = cl.SaveSettingsBundle(context.Background(), &createRequest)
|
||||
@@ -871,7 +871,7 @@ func TestListAllSettingsBundlesOfSameExtension(t *testing.T) {
|
||||
BundleKey: "bobs-bundle",
|
||||
},
|
||||
DisplayName: "Bob's Bundle",
|
||||
Settings: dummySettings,
|
||||
Settings: dummySettings,
|
||||
},
|
||||
}
|
||||
_, err = cl.SaveSettingsBundle(context.Background(), &createRequest)
|
||||
@@ -916,7 +916,7 @@ func TestListSettingsBundlesInFoldersThatAreNotAccessible(t *testing.T) {
|
||||
BundleKey: "alices-bundle",
|
||||
},
|
||||
DisplayName: "Alice's Bundle",
|
||||
Settings: dummySettings,
|
||||
Settings: dummySettings,
|
||||
},
|
||||
}
|
||||
_, err := cl.SaveSettingsBundle(context.Background(), &createRequest)
|
||||
@@ -929,7 +929,7 @@ func TestListSettingsBundlesInFoldersThatAreNotAccessible(t *testing.T) {
|
||||
BundleKey: "bobs-bundle",
|
||||
},
|
||||
DisplayName: "Bob's Bundle",
|
||||
Settings: dummySettings,
|
||||
Settings: dummySettings,
|
||||
},
|
||||
}
|
||||
_, err = cl.SaveSettingsBundle(context.Background(), &createRequest)
|
||||
@@ -942,7 +942,7 @@ func TestListSettingsBundlesInFoldersThatAreNotAccessible(t *testing.T) {
|
||||
BundleKey: "bobs-bundle",
|
||||
},
|
||||
DisplayName: "Bob's Bundle",
|
||||
Settings: dummySettings,
|
||||
Settings: dummySettings,
|
||||
},
|
||||
}
|
||||
_, err = cl.SaveSettingsBundle(context.Background(), &createRequest)
|
||||
|
||||
@@ -2,6 +2,7 @@ package svc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/owncloud/ocis-pkg/v2/middleware"
|
||||
"github.com/owncloud/ocis-settings/pkg/config"
|
||||
"github.com/owncloud/ocis-settings/pkg/proto/v0"
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
regexForKeys = regexp.MustCompile("^[A-Za-z0-9\\-_]*$")
|
||||
keyRule = []validation.Rule{
|
||||
regexForKeys = regexp.MustCompile(`^[A-Za-z0-9\-_]*$`)
|
||||
keyRule = []validation.Rule{
|
||||
validation.Required,
|
||||
validation.Match(regexForKeys),
|
||||
}
|
||||
@@ -83,4 +83,3 @@ func validateValueIdentifier(identifier *proto.Identifier) error {
|
||||
validation.Field(&identifier.AccountUuid, accountUUIDRule...),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user