3
0

Fix settings, logo upload

This commit is contained in:
Denis Arh 2020-12-15 14:41:17 +01:00
parent dad6be64cb
commit cfee999029
3 changed files with 4 additions and 3 deletions

View File

@ -157,7 +157,6 @@ func (svc attachment) CreateSettingsAttachment(name string, size int64, fh io.Re
}
att = &types.Attachment{
ID: nextID(),
OwnerID: currentUserID,
Name: strings.TrimSpace(name),
Kind: types.AttachmentKindSettings,
@ -184,6 +183,9 @@ func (svc attachment) create(name string, size int64, fh io.ReadSeeker, att *typ
aaProps = &attachmentActionProps{}
)
att.ID = nextID()
att.CreatedAt = *now()
if svc.files == nil {
return errors.New("can not create attachment: store handler not set")
}

View File

@ -1 +0,0 @@
package service

View File

@ -121,7 +121,7 @@ type (
Sticky bool `json:"sticky"`
} `json:"tabs"`
} `kv:"panels,final" json:"panels"`
} `kv:"one" json:"One"`
} `kv:"one" json:"one"`
// Admin struct {} `kv:"admin"`
} `kv:"ui" json:"ui"`