EntityAPI: Include folder support and watch API stubs (#61338)
This commit is contained in:
@@ -11,7 +11,6 @@ type summarySupport struct {
|
||||
name string
|
||||
description *string // null or empty
|
||||
slug *string // null or empty
|
||||
folder *string // null or empty
|
||||
labels *string
|
||||
fields *string
|
||||
errors *string // should not allow saving with this!
|
||||
@@ -37,9 +36,6 @@ func newSummarySupport(summary *models.EntitySummary) (*summarySupport, error) {
|
||||
if summary.Slug != "" {
|
||||
s.slug = &summary.Slug
|
||||
}
|
||||
if summary.Folder != "" {
|
||||
s.folder = &summary.Folder
|
||||
}
|
||||
if len(summary.Labels) > 0 {
|
||||
js, err = json.Marshal(summary.Labels)
|
||||
if err != nil {
|
||||
@@ -81,9 +77,6 @@ func (s summarySupport) toEntitySummary() (*models.EntitySummary, error) {
|
||||
if s.slug != nil {
|
||||
summary.Slug = *s.slug
|
||||
}
|
||||
if s.folder != nil {
|
||||
summary.Folder = *s.folder
|
||||
}
|
||||
if s.labels != nil {
|
||||
b := []byte(*s.labels)
|
||||
err = json.Unmarshal(b, &summary.Labels)
|
||||
|
||||
Reference in New Issue
Block a user