fix(assets): correct type column in assets (#4295)

* fix(asssets): correct remove asset objects with text column

* fix(assets): type asset_type, correct and add unit tests

* fix(assets): set unspecified objecttype to empty string

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Stefan Benz
2022-09-08 08:39:38 +01:00
committed by GitHub
parent aa4df33b62
commit 5052aa1c12
3 changed files with 127 additions and 6 deletions

View File

@@ -21,10 +21,21 @@ type Storage interface {
type ObjectType int32
const (
ObjectTypeUserAvatar = iota
ObjectTypeUserAvatar ObjectType = iota
ObjectTypeStyling
)
func (o ObjectType) String() string {
switch o {
case ObjectTypeUserAvatar:
return "0"
case ObjectTypeStyling:
return "1"
default:
return ""
}
}
type Asset struct {
InstanceID string
ResourceOwner string